-
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 #1490 from ministryofjustice/MLPAB-2358-back-cypress
MLPAB-2358 Use go(-2) instead of clicking back, add back link e2e test
- Loading branch information
Showing
3 changed files
with
30 additions
and
16 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
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,16 @@ | ||
describe('High level navigation', () => { | ||
describe('back link', () => { | ||
it('navigates to the previous page', () => { | ||
cy.visit('/fixtures?redirect=/task-list&progress=provideYourDetails') | ||
cy.contains('a', 'Choose your attorneys').click() | ||
|
||
cy.url().should('contain', '/choose-attorneys-guidance') | ||
cy.contains('button', 'Continue').click() | ||
|
||
cy.url().should('contain', '/choose-attorneys') | ||
cy.contains('a', 'Back').click() | ||
|
||
cy.url().should('contain', '/choose-attorneys-guidance') | ||
}) | ||
}) | ||
}) |