-
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 #1631 from ministryofjustice/i-cannot-spell
Fix template name for Check you can sign page
- Loading branch information
Showing
3 changed files
with
51 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
describe('Check you can sign', () => { | ||
describe('first time', () => { | ||
beforeEach(() => { | ||
cy.visit('/fixtures?redirect=/check-you-can-sign'); | ||
}); | ||
|
||
it('can be submitted', () => { | ||
cy.checkA11yApp(); | ||
cy.contains('a', 'Return to task list').should('not.exist'); | ||
|
||
cy.get('#f-yes-no').check({ force: true }); | ||
|
||
cy.contains('button', 'Save and continue').click(); | ||
cy.url().should('contain', '/your-preferred-language'); | ||
}); | ||
|
||
it('errors when empty', () => { | ||
cy.contains('button', 'Save and continue').click(); | ||
|
||
cy.get('.govuk-error-summary').within(() => { | ||
cy.contains('Select yes if you will be able to sign the LPA yourself'); | ||
}); | ||
|
||
cy.contains('fieldset .govuk-error-message', 'Select yes if you will be able to sign the LPA yourself'); | ||
}); | ||
}); | ||
|
||
describe('after completing', () => { | ||
beforeEach(() => { | ||
cy.visit('/fixtures?redirect=/check-you-can-sign&progress=chooseYourAttorneys'); | ||
}); | ||
|
||
it('shows task list button', () => { | ||
cy.contains('a', 'Return to task list'); | ||
}); | ||
}); | ||
}); |
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