-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1676 from ministryofjustice/MLPAB-2384-attorney-p…
…aper MLPAB-2384 Allow attorneys to use or change phone number given by paper donor
- Loading branch information
Showing
81 changed files
with
1,259 additions
and
1,119 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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,27 +1,126 @@ | ||
import { TestMobile } from '../../support/e2e'; | ||
import { TestMobile, TestMobile2 } from '../../support/e2e'; | ||
|
||
describe('Confirm your details', () => { | ||
beforeEach(() => { | ||
cy.visit('/fixtures/attorney?redirect=/phone-number'); | ||
describe('online donor', () => { | ||
beforeEach(() => { | ||
cy.visit('/fixtures/attorney?redirect=/task-list'); | ||
|
||
cy.get('#f-phone').type(TestMobile); | ||
cy.contains('button', 'Save and continue').click(); | ||
cy.contains('li', 'Confirm your details').should('contain', 'Not started').click(); | ||
|
||
cy.get('[name="language-preference"]').check('cy', { force: true }) | ||
cy.contains('button', 'Save and continue').click() | ||
}); | ||
cy.get('#f-phone').type(TestMobile); | ||
cy.contains('button', 'Save and continue').click(); | ||
|
||
it('shows details', () => { | ||
cy.url().should('contain', '/confirm-your-details'); | ||
cy.checkA11yApp(); | ||
cy.get('[name="language-preference"]').check('cy', { force: true }) | ||
cy.contains('button', 'Save and continue').click() | ||
}); | ||
|
||
cy.contains('2 January 2000'); | ||
cy.contains('Jessie Jones'); | ||
cy.contains('2 RICHMOND PLACE'); | ||
cy.contains('07700 900 000'); | ||
cy.contains('Welsh'); | ||
it('shows details', () => { | ||
cy.url().should('contain', '/confirm-your-details'); | ||
cy.checkA11yApp(); | ||
|
||
cy.contains('button', 'Continue').click(); | ||
cy.url().should('contain', '/task-list'); | ||
}); | ||
cy.contains('2 January 2000'); | ||
cy.contains('Jessie Jones'); | ||
cy.contains('2 RICHMOND PLACE'); | ||
cy.contains('07700 900 000'); | ||
cy.contains('Welsh'); | ||
|
||
cy.contains('button', 'Continue').click(); | ||
cy.url().should('contain', '/task-list'); | ||
}); | ||
}); | ||
|
||
describe('paper donor', () => { | ||
beforeEach(() => { | ||
cy.visit('/fixtures/attorney?is-paper-donor=1&redirect=/task-list'); | ||
|
||
cy.contains('li', 'Confirm your details').should('contain', 'Not started').click(); | ||
|
||
cy.get('#f-phone').type(TestMobile); | ||
cy.contains('button', 'Save and continue').click(); | ||
|
||
cy.get('[name="language-preference"]').check('cy', { force: true }) | ||
cy.contains('button', 'Save and continue').click() | ||
}); | ||
|
||
it('shows details', () => { | ||
cy.url().should('contain', '/confirm-your-details'); | ||
cy.checkA11yApp(); | ||
|
||
cy.contains('2 January 2000'); | ||
cy.contains('Jessie Jones'); | ||
cy.contains('2 RICHMOND PLACE'); | ||
cy.contains('07700 900 000'); | ||
cy.contains('Welsh'); | ||
|
||
cy.contains('button', 'Continue').click(); | ||
cy.url().should('contain', '/task-list'); | ||
}); | ||
}); | ||
|
||
describe('paper donor gave phone number', () => { | ||
beforeEach(() => { | ||
cy.visit('/fixtures/attorney?is-paper-donor=1&has-phone-number=1&redirect=/task-list'); | ||
|
||
cy.contains('li', 'Confirm your details').should('contain', 'Not started').click(); | ||
|
||
cy.get('[name="language-preference"]').check('cy', { force: true }) | ||
cy.contains('button', 'Save and continue').click() | ||
}); | ||
|
||
it('shows details', () => { | ||
cy.url().should('contain', '/confirm-your-details'); | ||
cy.checkA11yApp(); | ||
|
||
cy.contains('h2', 'Details you have given us').next().within(() => { | ||
cy.contains('Welsh'); | ||
cy.contains('Phone number').should('not.exist'); | ||
}); | ||
|
||
cy.contains('h2', 'Details the donor has given about you').next().within(() => { | ||
cy.contains('2 January 2000'); | ||
cy.contains('Jessie Jones'); | ||
cy.contains('2 RICHMOND PLACE'); | ||
cy.contains('07700 900 000'); | ||
}); | ||
|
||
cy.contains('button', 'Continue').click(); | ||
cy.url().should('contain', '/task-list'); | ||
}); | ||
|
||
it('can change the phone number', () => { | ||
cy.contains('.govuk-summary-list__row', 'Phone number').contains('a', 'Change').click(); | ||
cy.get('#f-phone').clear().type(TestMobile2); | ||
cy.contains('button', 'Save and continue').click() | ||
|
||
cy.contains('h2', 'Details you have given us').next().within(() => { | ||
cy.contains('07700 900 111'); | ||
cy.contains('Welsh'); | ||
}); | ||
|
||
cy.contains('h2', 'Details the donor has given about you').next().within(() => { | ||
cy.contains('2 January 2000'); | ||
cy.contains('Jessie Jones'); | ||
cy.contains('2 RICHMOND PLACE'); | ||
cy.contains('Phone number').should('not.exist'); | ||
}); | ||
}); | ||
|
||
it('can remove the phone number', () => { | ||
cy.contains('.govuk-summary-list__row', 'Phone number').contains('a', 'Change').click(); | ||
cy.get('#f-phone').clear(); | ||
cy.contains('button', 'Save and continue').click() | ||
|
||
cy.contains('h2', 'Details you have given us').next().within(() => { | ||
cy.contains('Enter phone number'); | ||
cy.contains('Welsh'); | ||
}); | ||
|
||
cy.contains('h2', 'Details the donor has given about you').next().within(() => { | ||
cy.contains('2 January 2000'); | ||
cy.contains('Jessie Jones'); | ||
cy.contains('2 RICHMOND PLACE'); | ||
cy.contains('Phone number').should('not.exist'); | ||
}); | ||
}); | ||
}); | ||
}); |
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
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.