Skip to content

Commit

Permalink
Update smoke test to use GOV.UK Frontend paths
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Sep 13, 2023
1 parent c2b6466 commit 60af033
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cypress/e2e/smoke/0-smoke-tests/index-page.cypress.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
const path = require('path')

const { waitForApplication, restoreStarterFiles } = require('../../utils')

describe('smoke test', () => {
Expand All @@ -11,7 +13,8 @@ describe('smoke test', () => {
it('GOV.UK Frontend fonts loaded', () => {
waitForApplication('/')

const fontUrl = '/plugin-assets/govuk-frontend/govuk/assets/fonts/bold-b542beb274-v2.woff2'
const includePath = path.dirname(require.resolve('govuk-frontend')).split('node_modules/govuk-frontend')[1].split('\\').join('/')
const fontUrl = `/plugin-assets/govuk-frontend${includePath}/assets/fonts/bold-b542beb274-v2.woff2`

cy.task('log', 'Requesting govuk-frontend font')
cy.request(`/${fontUrl}`, { retryOnStatusCodeFailure: true })
Expand Down

0 comments on commit 60af033

Please sign in to comment.