-
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 #1691 from ministryofjustice/MLPAB-2689-show-cp-da…
…shcard-when-signed-but-no-id MLPAB-2689: Show dashboard certificate providers until certificate provided and identity confirmed
- Loading branch information
Showing
5 changed files
with
88 additions
and
13 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,51 @@ | ||
describe('Dashboard', () => { | ||
context('confirmed identity', () => { | ||
it('shows the certificate provider card', () => { | ||
cy.visit('/fixtures/certificate-provider?redirect=/task-list&progress=confirmYourIdentity'); | ||
|
||
cy.contains('li', 'Confirm your details').should('contain', 'Completed'); | ||
cy.contains('li', 'Confirm your identity').should('contain', 'Completed'); | ||
cy.contains('li', 'Provide your certificate').should('contain', 'Not started'); | ||
|
||
cy.visit('/dashboard') | ||
|
||
cy.contains('I’m a certificate provider').click() | ||
cy.contains('Property and affairs'); | ||
cy.contains('Sam Smith'); | ||
cy.contains('strong', 'In progress'); | ||
cy.contains('a', 'Go to task list') | ||
}) | ||
}) | ||
|
||
context('provided certificate', () => { | ||
it('does not show the certificate provider card', () => { | ||
cy.visit('/fixtures/certificate-provider?redirect=/task-list&progress=provideYourCertificate'); | ||
|
||
cy.contains('li', 'Confirm your details').should('contain', 'Completed'); | ||
cy.contains('li', 'Confirm your identity').should('contain', 'Completed'); | ||
cy.contains('li', 'Provide your certificate').should('contain', 'Completed'); | ||
|
||
cy.visit('/dashboard') | ||
|
||
cy.contains('I’m a certificate provider').should('not.exist') | ||
}) | ||
}) | ||
|
||
context('provided certificate but identity mismatch', () => { | ||
it('shows the certificate provider card', () => { | ||
cy.visit('/fixtures/certificate-provider?redirect=/task-list&progress=provideYourCertificate&idStatus=mismatch'); | ||
|
||
cy.contains('li', 'Confirm your details').should('contain', 'Completed'); | ||
cy.contains('li', 'Confirm your identity').should('contain', 'Pending'); | ||
cy.contains('li', 'Provide your certificate').should('contain', 'Completed'); | ||
|
||
cy.visit('/dashboard') | ||
|
||
cy.contains('I’m a certificate provider').click() | ||
cy.contains('Property and affairs'); | ||
cy.contains('Sam Smith'); | ||
cy.contains('strong', 'In progress'); | ||
cy.contains('a', 'Go 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
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