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

Turn digests back on in test environment #2767

Merged
merged 1 commit into from
May 10, 2023
Merged

Turn digests back on in test environment #2767

merged 1 commit into from
May 10, 2023

Conversation

jon-kirwan
Copy link
Contributor

@jon-kirwan jon-kirwan commented May 10, 2023

What

https://trello.com/c/fc41oyEK/1923-enable-individual-loading-of-stylesheets-in-government-frontend.

Turn digests back on (remove config.assets.digest = false) in test environment as a pre-requisite to implementing the AssetHelper to load component and view style sheets only required on the page being viewed.

Why

The default config.assets.digest was changed here: a806be8 due to an issue loading Axe core in integration tests (with a comment to re-enable the option).

I've discovered an issue running some tests when individual style sheets are loaded with the GOV.UK Publishing Components AssetHelper module.

test_guides_with_no_parts_in_a_step_by_step_with_hide_chapter_navigation_do_not_error
ERROR (4.82s)
Minitest::UnexpectedError: ActionController::RoutingError: No route matches [GET] 
"/govuk_publishing_components/components/_step-by-step-nav-related.css"
@import "components/step-by-step-nav-related";
@import "components/step-by-step-nav";
  • The error only occurs when that suffix is 7 or more characters (you do not see this with _attachment-link.css).

With digests re-enabled I've seen no issues running component guide accessibility tests locally -

Notice

Banner

Visual changes

None.

@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-2767 May 10, 2023 10:59 Inactive
@govuk-ci govuk-ci temporarily deployed to government-frontend-pr-2767 May 10, 2023 12:34 Inactive
Copy link
Contributor

@MartinJJones MartinJJones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good to me 👍

@jon-kirwan jon-kirwan merged commit 12848f4 into main May 10, 2023
8 checks passed
@jon-kirwan jon-kirwan deleted the turn-digests-on branch May 10, 2023 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants