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-333 update int tests for probation history and staff contact pages
- Loading branch information
1 parent
1b4ab2a
commit c7c8b35
Showing
5 changed files
with
107 additions
and
64 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,91 @@ | ||
import Page from '../pages/page' | ||
import StaffContacts from '../pages/staffContacts' | ||
|
||
context('Staff contacts', () => { | ||
it('Staff contacts page is rendered', () => { | ||
cy.visit('/case/X000001/personal-details/staff-contacts') | ||
const page = Page.verifyOnPage(StaffContacts) | ||
cy.get('h2').eq(0).should('contain.text', 'Current contacts') | ||
cy.get('h3').eq(0).should('contain.text', 'Arhsimna Xolfo') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dt', 0, 'Role') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dd', 0, 'Prison Offender Manager (POM)') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dt', 1, 'Phone number') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dd', 1, '07321165373') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dt', 2, 'Email') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dd', 2, '[email protected]') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dt', 3, 'Provider') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dd', 3, 'London') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dt', 4, 'Probation Delivery Unit (PDU)') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dd', 4, 'All London') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dt', 5, 'Team') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dd', 5, 'Unallocated Team (N07)') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dt', 6, 'Allocated until') | ||
page.assertPageElementAtIndexWithin('dl', 0, 'dd', 6, '22 April 2025') | ||
|
||
cy.get('h3').eq(1).should('contain.text', 'Yrhreender Hanandra') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dt', 0, 'Role') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dd', 0, 'Community Offender Manager (COM)') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dt', 1, 'Phone number') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dd', 1, '07321165373') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dt', 2, 'Email') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dd', 2, '[email protected]') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dt', 3, 'Provider') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dd', 3, 'London') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dt', 4, 'Probation Delivery Unit (PDU)') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dd', 4, 'All London') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dt', 5, 'Team') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dd', 5, 'Unallocated Team (N07)') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dt', 6, 'Allocated until') | ||
page.assertPageElementAtIndexWithin('dl', 1, 'dd', 6, '22 April 2025') | ||
|
||
cy.get('h3').eq(2).should('contain.text', 'Iwendeps Yvygsee') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dt', 0, 'Role') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dd', 0, 'Probation practitioner') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dt', 1, 'Phone number') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dd', 1, '07321165373') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dt', 2, 'Email') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dd', 2, '[email protected]') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dt', 3, 'Provider') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dd', 3, 'London') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dt', 4, 'Probation Delivery Unit (PDU)') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dd', 4, 'All London') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dt', 5, 'Team') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dd', 5, 'Unallocated Team (N07)') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dt', 6, 'Allocated until') | ||
page.assertPageElementAtIndexWithin('dl', 2, 'dd', 6, '22 April 2025') | ||
|
||
cy.get('h2').eq(1).should('contain.text', 'Previous contacts') | ||
|
||
cy.get('h3').eq(3).should('contain.text', 'Peter Parker') | ||
page.assertPageElementAtIndexWithin('dl', 3, 'dt', 0, 'Phone number') | ||
page.assertPageElementAtIndexWithin('dl', 3, 'dd', 0, '07321165373') | ||
page.assertPageElementAtIndexWithin('dl', 3, 'dt', 1, 'Email') | ||
page.assertPageElementAtIndexWithin('dl', 3, 'dd', 1, '[email protected]') | ||
page.assertPageElementAtIndexWithin('dl', 3, 'dt', 2, 'Provider') | ||
page.assertPageElementAtIndexWithin('dl', 3, 'dd', 2, 'London') | ||
page.assertPageElementAtIndexWithin('dl', 3, 'dt', 3, 'Probation Delivery Unit (PDU)') | ||
page.assertPageElementAtIndexWithin('dl', 3, 'dd', 3, 'N07 Cluster 1') | ||
page.assertPageElementAtIndexWithin('dl', 3, 'dt', 4, 'Team') | ||
page.assertPageElementAtIndexWithin('dl', 3, 'dd', 4, 'OMU B') | ||
|
||
cy.get('h3').eq(4).should('contain.text', 'Bruce Wayne') | ||
page.assertPageElementAtIndexWithin('dl', 4, 'dt', 0, 'Provider') | ||
page.assertPageElementAtIndexWithin('dl', 4, 'dd', 0, 'Leicester') | ||
page.assertPageElementAtIndexWithin('dl', 4, 'dt', 1, 'Probation Delivery Unit (PDU)') | ||
page.assertPageElementAtIndexWithin('dl', 4, 'dd', 1, 'Leicestershire All') | ||
page.assertPageElementAtIndexWithin('dl', 4, 'dt', 2, 'Team') | ||
page.assertPageElementAtIndexWithin('dl', 4, 'dd', 2, 'OMU B') | ||
page.assertPageElementAtIndexWithin('dl', 4, 'dt', 3, 'Allocated until') | ||
page.assertPageElementAtIndexWithin('dl', 4, 'dd', 3, '30 April 2024') | ||
|
||
cy.get('h3').eq(5).should('contain.text', 'Jon Smith') | ||
page.assertPageElementAtIndexWithin('dl', 5, 'dt', 0, 'Provider') | ||
page.assertPageElementAtIndexWithin('dl', 5, 'dd', 0, 'Public Protection Unit') | ||
page.assertPageElementAtIndexWithin('dl', 5, 'dt', 1, 'Probation Delivery Unit (PDU)') | ||
page.assertPageElementAtIndexWithin('dl', 5, 'dd', 1, 'Bradford') | ||
page.assertPageElementAtIndexWithin('dl', 5, 'dt', 2, 'Team') | ||
page.assertPageElementAtIndexWithin('dl', 5, 'dd', 2, 'CPA West Yorkshire') | ||
page.assertPageElementAtIndexWithin('dl', 5, 'dt', 3, 'Allocated until') | ||
page.assertPageElementAtIndexWithin('dl', 5, 'dd', 3, '30 January 2025') | ||
}) | ||
}) |
This file was deleted.
Oops, something went wrong.
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 StaffContacts extends Page { | ||
constructor() { | ||
super('Staff contacts') | ||
} | ||
} |