Skip to content

Commit

Permalink
Merge pull request #2327 from alphagov/frontend-v5-compatibility-coli…
Browse files Browse the repository at this point in the history
…n-preview

Use GOV.UK Frontend v5 on management pages and tests
  • Loading branch information
colinrotherham authored Jan 11, 2024
2 parents 03d1bc4 + 2fedd46 commit 34b0ad1
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/smoke/0-smoke-tests/index-page.cypress.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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')
}

Expand Down
4 changes: 2 additions & 2 deletions lib/nunjucks/views/manage-prototype/scripts.njk
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<script src="/plugin-assets/govuk-prototype-kit/lib/assets/javascripts/kit.js"></script>
<script src="/manage-prototype/dependencies/govuk-frontend/govuk/all.js"></script>
<script src="/manage-prototype/dependencies/govuk-frontend/govuk-prototype-kit/init.js"></script>
<script src="/manage-prototype/dependencies/govuk-frontend/dist/govuk/govuk-frontend.min.js" type="module"></script>
<script src="/manage-prototype/dependencies/govuk-frontend/dist/govuk-prototype-kit/init.js" type="module"></script>
14 changes: 7 additions & 7 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 34b0ad1

Please sign in to comment.