-
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.
Send to correct page from previous application
- Loading branch information
Showing
13 changed files
with
170 additions
and
76 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,35 @@ | ||
describe('Previous application number', () => { | ||
it('can be submitted', () => { | ||
beforeEach(() => { | ||
cy.visit('/fixtures?redirect=/previous-application-number'); | ||
}); | ||
|
||
it('can be submitted', () => { | ||
cy.checkA11yApp(); | ||
|
||
cy.get('#f-previous-application-number').type('ABC'); | ||
cy.get('#f-previous-application-number').type('MABC'); | ||
cy.contains('button', 'Save and continue').click(); | ||
|
||
cy.contains('button', 'Continue').click(); | ||
cy.url().should('contain', '/task-list'); | ||
cy.url().should('contain', '/what-happens-after-no-fee'); | ||
}); | ||
|
||
it('errors when unselected', () => { | ||
cy.visit('/fixtures?redirect=/previous-application-number'); | ||
cy.contains('button', 'Save and continue').click(); | ||
|
||
cy.contains('button', 'Continue').click(); | ||
cy.get('.govuk-error-summary').within(() => { | ||
cy.contains('Enter previous reference number'); | ||
}); | ||
|
||
cy.contains('.govuk-error-message', 'Enter previous reference number'); | ||
}); | ||
|
||
it('errors when not correct format', () => { | ||
cy.get('#f-previous-application-number').type('ABC'); | ||
cy.contains('button', 'Save and continue').click(); | ||
|
||
cy.get('.govuk-error-summary').within(() => { | ||
cy.contains('Enter previousApplicationNumber'); | ||
cy.contains('Previous reference number must begin with 7 or M'); | ||
}); | ||
|
||
cy.contains('.govuk-fieldset .govuk-error-message', 'Enter previousApplicationNumber'); | ||
cy.contains('.govuk-error-message', 'Previous reference number must begin with 7 or M'); | ||
}); | ||
}); |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ | |
"errorSelect": "Select {{.Label}}", | ||
"errorEmail": "{{.Label}} must be in the correct format, like [email protected]", | ||
"errorPostcode": "{{.Label}} must be a UK postcode", | ||
"errorReferenceNumber": "{{.Label}} must begin with 7 or M", | ||
"donorMatchesActorWarning": "The donor’s name is also {{.FirstNames}} {{.LastName}}. The donor cannot be {{.Type}}.", | ||
"attorneyMatchesActorWarning": "There is also an attorney called {{.FirstNames}} {{.LastName}}. An attorney cannot be {{.Type}}.", | ||
"attorneyMatchesAttorneyWarning": "There is already an attorney called {{.FirstNames}} {{.LastName}}.", | ||
|
@@ -841,5 +842,10 @@ | |
"youHaveWithdrawnLpaNumber": "You have withdrawn LPA number <span class=\"govuk-!-font-weight-bold\">{{.UID}}</span>.", | ||
"opgWillNowContactAnyoneWhoHasAlreadyBeenContacted": "OPG will now contact anyone who has already been contacted in relation to your LPA and notify them of your decision to withdraw.", | ||
"withdrawn": "Withdrawn", | ||
"dateLpaSigned": "Date LPA signed" | ||
"dateLpaSigned": "Date LPA signed", | ||
"whatIsYourPreviousReferenceNumber": "What is your previous reference number?", | ||
"whatIsYourPreviousReferenceNumberContent": "<p class=\"govuk-body\">You’ve told us that you recently made an LPA application.</p><p class=\"govuk-body\">We need your previous reference number so that we can match your old application to your new one.</p>", | ||
"whereCanFindReferenceNumber": "Where can I find my reference number?", | ||
"whereCanFindReferenceNumberDetails": "<p class=\"govuk-body\">Your reference number (also called ‘OPG reference number’ or ‘Our ref’) is on any letter you have from the Office of the Public Guardian.</p><p class=\"govuk-body\">It should also be on the cover letter we sent you when we sent your original application back to you.</p>", | ||
"previousApplicationNumber": "Previous reference number" | ||
} |
Oops, something went wrong.