-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
describe('Enter voucher', () => { | ||
beforeEach(() => { | ||
cy.visit('/fixtures?redirect=/enter-voucher&progress=payForTheLpa'); | ||
}); | ||
|
||
it('can confirm', () => { | ||
cy.get('#f-first-names').type('Sam'); | ||
cy.get('#f-last-name').type('Smith'); | ||
cy.get('#f-email').type('[email protected]'); | ||
cy.contains('button', 'Save and continue').click(); | ||
|
||
cy.url().should('contain', '/confirm-person-allowed-to-vouch'); | ||
}); | ||
|
||
it('can confirm', () => { | ||
cy.checkA11yApp(); | ||
|
||
cy.contains('You have entered a name which matches your name, Sam Smith.'); | ||
|
@@ -20,11 +21,6 @@ describe('Enter voucher', () => { | |
}); | ||
|
||
it('can select another', () => { | ||
cy.get('#f-first-names').type('Sam'); | ||
cy.get('#f-last-name').type('Smith'); | ||
cy.get('#f-email').type('[email protected]'); | ||
cy.contains('button', 'Save and continue').click(); | ||
|
||
cy.get('input[name=yes-no]').check('no'); | ||
cy.contains('button', 'Save and continue').click(); | ||
|
||
|
@@ -33,4 +29,17 @@ describe('Enter voucher', () => { | |
cy.get('#f-last-name').should('have.value', ''); | ||
cy.get('#f-email').should('have.value', ''); | ||
}); | ||
|
||
it('errors when not selected', () => { | ||
cy.contains('button', 'Save and continue').click(); | ||
|
||
cy.url().should('contain', '/confirm-person-allowed-to-vouch'); | ||
cy.checkA11yApp(); | ||
|
||
cy.get('.govuk-error-summary').within(() => { | ||
cy.contains('Select yes, if the person is allowed to vouch for you'); | ||
}); | ||
|
||
cy.contains('.govuk-fieldset .govuk-error-message', 'Select yes, if the person is allowed to vouch for you'); | ||
}); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.