generated from ministryofjustice/hmpps-template-typescript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Man 287 ensure consistent approach to comments added (#317)
* MAN-287 update notes on personal-contact page * MAN-287 update notes on disabilities page * MAN-287 update integration tests * MAN-287 update integration tests
- Loading branch information
1 parent
01e50a5
commit 2ee3e80
Showing
23 changed files
with
721 additions
and
1,155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,46 @@ | ||
import DisabilityPage from '../../pages/personalDetails/disability' | ||
import DisabilitiesPage from '../../pages/personalDetails/disabilities' | ||
import Page from '../../pages/page' | ||
|
||
context('Contact', () => { | ||
it('Contact page is rendered', () => { | ||
cy.visit('/case/X000001/personal-details/disabilities') | ||
const page = Page.verifyOnPage(DisabilitiesPage) | ||
page.assertAnchorElementAtIndexWithin( | ||
'p', | ||
0, | ||
0, | ||
'https://ndelius-dummy-url/NDelius-war/delius/JSP/deeplink.xhtml?component=EqualityMonitoring&CRN=X000001', | ||
) | ||
|
||
const page = Page.verifyOnPage(DisabilityPage) | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__key]', 0, 'Disability') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__key]', 1, 'Start date') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__key]', 2, 'Notes') | ||
|
||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__value]', 0, 'Dyslexia') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__value]', 1, '3 April 2021') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__value]', 2, 'Disability Notes') | ||
}) | ||
|
||
it('Contact page is rendered', () => { | ||
cy.visit('/case/X000001/personal-details/disability/0/note/0') | ||
const page = Page.verifyOnPage(DisabilitiesPage) | ||
page.assertAnchorElementAtIndexWithin( | ||
'p', | ||
0, | ||
0, | ||
'https://ndelius-dummy-url/NDelius-war/delius/JSP/deeplink.xhtml?component=EqualityMonitoring&CRN=X000001', | ||
) | ||
|
||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__key]', 0, 'Disability') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__key]', 1, 'Start date') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__key]', 2, 'Note added by') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__key]', 3, 'Date added') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__key]', 4, 'Notes') | ||
|
||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__value]', 0, 'Dyslexia') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__value]', 1, '3 April 2021') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__value]', 2, 'Tom Brady') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__value]', 3, '30 October 2024') | ||
page.assertTextAtElementAtIndex('[class=govuk-summary-list__value]', 4, 'Disability Notes') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Page, { PageElement } from '../page' | ||
|
||
export default class ContactGPPage extends Page { | ||
constructor() { | ||
super('GP') | ||
} | ||
|
||
getRowData = (rowName: string, type: string): PageElement => { | ||
return cy.get(`[data-qa=${rowName}${type}]`) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Page from '../page' | ||
|
||
export default class DisabilitiesPage extends Page { | ||
constructor() { | ||
super('Disabilities') | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
export interface Note { | ||
id: number | ||
createdBy: string | ||
createdByDate: string | ||
note: string | ||
hasNotesBeenTruncated: boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.