diff --git a/cypress/e2e/errors/1-error-page-tests/fatal-error.cypress.js b/cypress/e2e/errors/1-error-page-tests/fatal-error.cypress.js index 9edd673bb5..1c38b23c96 100644 --- a/cypress/e2e/errors/1-error-page-tests/fatal-error.cypress.js +++ b/cypress/e2e/errors/1-error-page-tests/fatal-error.cypress.js @@ -29,6 +29,8 @@ describe('Fatal Error Test', () => { cy.task('log', `Replace ${appRoutes} with Broken routes`) cy.task('copyFile', { source: completelyBrokenRoutesFixture, target: appRoutes }) + cy.wait(5000) + cy.get('.govuk-heading-l').contains(pageName) cy.get('.govuk-body .govuk-link').contains(contactSupportText) cy.get('#govuk-prototype-kit-error-file').contains(expectedErrorFileAndLine) @@ -37,6 +39,8 @@ describe('Fatal Error Test', () => { cy.task('log', `Restore ${appRoutes} with original routes`) restore() + cy.wait(5000) + cy.get('.govuk-heading-l').contains(homePageName) }) }) diff --git a/lib/assets/sass/prototype.scss b/lib/assets/sass/prototype.scss index 32f7b0da7a..2de44a4ab1 100644 --- a/lib/assets/sass/prototype.scss +++ b/lib/assets/sass/prototype.scss @@ -25,7 +25,8 @@ } } -#govuk-prototype-kit-error-block { + +.govuk-prototype-kit-error-code { display: block; border: 1px solid black; padding: 1em; @@ -37,6 +38,12 @@ } } +.govuk-prototype-kit-error-code:focus{ + outline: 3px solid govuk-colour("yellow"); + outline-offset: 0; + box-shadow: inset 0 0 0 2px; +} + #govuk-prototype-kit-error-line { background: govuk-colour("red"); color: govuk-colour("white"); diff --git a/lib/nunjucks/views/error-handling/server-error.njk b/lib/nunjucks/views/error-handling/server-error.njk index 7616bc4ffa..ae2b4528ee 100644 --- a/lib/nunjucks/views/error-handling/server-error.njk +++ b/lib/nunjucks/views/error-handling/server-error.njk @@ -27,18 +27,18 @@
{% if error.sourceCode %} -+{{ error.sourceCode.before }}
{{ error.sourceCode.error }}
{{ error.sourceCode.after }}
{% endif %} -{{ error.sourceCode.before }}
{{ error.sourceCode.error }}
{{ error.sourceCode.after }}
{{ errorStack }}
+ {{ errorStack }}
- +
@@ -48,12 +48,25 @@ {% endblock %} + +{% block footer %} + {{ govukFooter({}) }} +{% endblock %} + + {% block pageScripts %}