From f485d0cc3aa3116f1da1fbcc18bb5053570f8231 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Fri, 8 Dec 2023 16:47:41 +0000 Subject: [PATCH 1/5] Install GOV.UK Frontend v5.0.0 --- npm-shrinkwrap.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 6122f277b2..4900d43db1 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -20,7 +20,7 @@ "express": "^4.18.2", "express-session": "^1.17.3", "fs-extra": "^11.1.1", - "govuk-frontend": "4.7.0", + "govuk-frontend": "5.0.0", "inquirer": "^8.2.6", "lodash": "^4.17.21", "marked": "^4.3.0", @@ -6149,9 +6149,9 @@ } }, "node_modules/govuk-frontend": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-4.7.0.tgz", - "integrity": "sha512-0OsdCusF5qvLWwKziU8zqxiC0nq6WP0ZQuw51ymZ/1V0tO71oIKMlSLN2S9bm8RcEGSoidPt2A34gKxePrLjvg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-5.0.0.tgz", + "integrity": "sha512-3WSfvQ+3kw/q/m8jrq/t8XnMUA8D2r0uhGyZaDbIh1gWTJBQzJBHbHiKYI9nc9ixIXdCFsc9RozkgEm57a795g==", "engines": { "node": ">= 4.2.0" } @@ -16452,9 +16452,9 @@ } }, "govuk-frontend": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-4.7.0.tgz", - "integrity": "sha512-0OsdCusF5qvLWwKziU8zqxiC0nq6WP0ZQuw51ymZ/1V0tO71oIKMlSLN2S9bm8RcEGSoidPt2A34gKxePrLjvg==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-5.0.0.tgz", + "integrity": "sha512-3WSfvQ+3kw/q/m8jrq/t8XnMUA8D2r0uhGyZaDbIh1gWTJBQzJBHbHiKYI9nc9ixIXdCFsc9RozkgEm57a795g==" }, "graceful-fs": { "version": "4.2.10", diff --git a/package.json b/package.json index d711450200..97cfc8865b 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "express": "^4.18.2", "express-session": "^1.17.3", "fs-extra": "^11.1.1", - "govuk-frontend": "4.7.0", + "govuk-frontend": "5.0.0", "inquirer": "^8.2.6", "lodash": "^4.17.21", "marked": "^4.3.0", From 7792fa4a839e1168123dd03dcc4fe232fd27d2dc Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Mon, 4 Sep 2023 17:05:28 +0100 Subject: [PATCH 2/5] Use GOV.UK Frontend v5 scripts on management pages --- lib/nunjucks/views/manage-prototype/scripts.njk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/nunjucks/views/manage-prototype/scripts.njk b/lib/nunjucks/views/manage-prototype/scripts.njk index 4b09283f9d..5c028e3206 100644 --- a/lib/nunjucks/views/manage-prototype/scripts.njk +++ b/lib/nunjucks/views/manage-prototype/scripts.njk @@ -1,3 +1,3 @@ - - + + From d508d348e0d9b121f2fda2ee754ba8acf4c2b233 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Wed, 4 Oct 2023 17:19:17 +0100 Subject: [PATCH 3/5] Use GOV.UK Frontend v5 paths in smoke test --- cypress/e2e/smoke/0-smoke-tests/index-page.cypress.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/smoke/0-smoke-tests/index-page.cypress.js b/cypress/e2e/smoke/0-smoke-tests/index-page.cypress.js index 5de33e60cd..1d5c2e8628 100644 --- a/cypress/e2e/smoke/0-smoke-tests/index-page.cypress.js +++ b/cypress/e2e/smoke/0-smoke-tests/index-page.cypress.js @@ -9,9 +9,9 @@ describe('smoke test', () => { }) it('GOV.UK Frontend fonts loaded', () => { - waitForApplication('/') + waitForApplication('/manage-prototype') - const fontUrl = '/plugin-assets/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2' + const fontUrl = '/manage-prototype/dependencies/govuk-frontend/dist/govuk/assets/fonts/bold-b542beb274-v2.woff2' cy.task('log', 'Requesting govuk-frontend font') cy.request(`/${fontUrl}`, { retryOnStatusCodeFailure: true }) From e4ece8928d1baa1046167881af4f72168dbbbe13 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Thu, 30 Nov 2023 13:01:50 +0000 Subject: [PATCH 4/5] Update tests for GOV.UK Frontend v5 header changes --- .../no-autodatastore-on-management-pages.cypress.js | 4 ++-- cypress/e2e/utils.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/dev/5-management-tests/no-autodatastore-on-management-pages.cypress.js b/cypress/e2e/dev/5-management-tests/no-autodatastore-on-management-pages.cypress.js index 3145cf9804..8a0f1e75c8 100644 --- a/cypress/e2e/dev/5-management-tests/no-autodatastore-on-management-pages.cypress.js +++ b/cypress/e2e/dev/5-management-tests/no-autodatastore-on-management-pages.cypress.js @@ -55,9 +55,9 @@ describe('clear data page', () => { cy.task('log', 'Add some data') cy.visit(`/question-check?most-impressive-trick=${encodeURIComponent(answer)}`) - cy.get('.govuk-header__logotype-text') + cy.get('.govuk-header__logotype') cy.visit('/manage-prototype/plugins?abc=def') - cy.get('.govuk-header__logotype-text') + cy.get('.govuk-header__logotype') cy.task('log', 'Check data has been saved') cy.visit('/question-check') diff --git a/cypress/e2e/utils.js b/cypress/e2e/utils.js index 7f78caf6e2..04ae35eead 100644 --- a/cypress/e2e/utils.js +++ b/cypress/e2e/utils.js @@ -15,7 +15,7 @@ const waitForApplication = async (path = '/index') => { log(`Waiting for app to restart and load ${path} page`) cy.task('waitUntilAppRestarts') cy.visit(path) - cy.get('.govuk-header__logotype-text') + cy.get('.govuk-header__logotype') .contains('GOV.UK') } From 2fedd466c8628519be54aca3ac86695dfd241ae1 Mon Sep 17 00:00:00 2001 From: Colin Rotherham Date: Thu, 11 Jan 2024 16:28:11 +0000 Subject: [PATCH 5/5] Add CHANGELOG entry --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 010160dc06..e6bda10bd0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Fixes + +- [#2327: Use GOV.UK Frontend v5 on management pages and tests](https://github.com/alphagov/govuk-prototype-kit/pull/2327) + ## 13.16.0 ### New features