Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PP-13255 Add error summary to organisation details form #4380

Merged
merged 1 commit into from
Dec 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
href: backLink
}) if backLink }}

{% if errors %}
{{ govukErrorSummary({
titleText: "There is a problem",
errorList: errors.summary
}) }}
{% endif %}

<h1 class="govuk-heading-l">Organisation details</h1>

<p class="govuk-body govuk-!-margin-bottom-6 hint-and-body-width">Payment card schemes require the details of the organisation taking payment to be shown on payment pages.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,15 @@ describe('Organisation details settings', () => {

cy.location('pathname').should('eq', `/simplified/service/${SERVICE_EXTERNAL_ID}/account/${ACCOUNT_TYPE}/settings/organisation-details/edit`)

cy.get('.govuk-error-summary')
.should('exist')
.should('contain', 'Organisation name must be 100 characters or fewer')
.should('contain', 'Enter a building and street')
.should('contain', 'Enter a town or city')
.should('contain', 'Enter a real postcode')
.should('contain', 'Enter a telephone number, like 01632 960 001, 07700 900 982 or +44 0808 157 0192')
.should('contain', 'Enter a valid website address')

cy.get('#organisation-name-error').should('contain.text', 'Organisation name must be 100 characters or fewer')
cy.get('#address-line1-error').should('contain.text', 'Enter a building and street')
cy.get('#address-city-error').should('contain.text', 'Enter a town or city')
Expand Down
Loading