From a352147ef55de0876ab943e26120db57546ade0d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Jul 2024 15:30:25 +0000 Subject: [PATCH 1/2] Bump govuk_publishing_components from 40.1.0 to 41.0.0 Bumps [govuk_publishing_components](https://github.com/alphagov/govuk_publishing_components) from 40.1.0 to 41.0.0. - [Changelog](https://github.com/alphagov/govuk_publishing_components/blob/main/CHANGELOG.md) - [Commits](https://github.com/alphagov/govuk_publishing_components/compare/v40.1.0...v41.0.0) --- updated-dependencies: - dependency-name: govuk_publishing_components dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 699d2a1d1..6908fccb7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -162,7 +162,7 @@ GEM govuk_personalisation (0.16.0) plek (>= 1.9.0) rails (>= 6, < 8) - govuk_publishing_components (40.1.0) + govuk_publishing_components (41.0.0) govuk_app_config govuk_personalisation (>= 0.7.0) kramdown From ca8de83e9c472d76498d37f6e9f4c8c7b3b14f93 Mon Sep 17 00:00:00 2001 From: Andy Sellick Date: Tue, 30 Jul 2024 16:38:50 +0100 Subject: [PATCH 2/2] Fix breaking changes - details.js no longer exists - adjust attachments tests to correct details component markup --- app/assets/javascripts/application.js | 1 - test/integration/call_for_evidence_test.rb | 2 +- test/integration/consultation_test.rb | 2 +- test/integration/publication_test.rb | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 3110fcc69..c55407266 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -1,5 +1,4 @@ //= require govuk_publishing_components/lib -//= require govuk_publishing_components/components/details //= require govuk_publishing_components/components/govspeak //= require govuk_publishing_components/components/image-card //= require govuk_publishing_components/components/intervention diff --git a/test/integration/call_for_evidence_test.rb b/test/integration/call_for_evidence_test.rb index be90222ef..da0bb628b 100644 --- a/test/integration/call_for_evidence_test.rb +++ b/test/integration/call_for_evidence_test.rb @@ -263,7 +263,7 @@ def teardown attachments.each do |attachment| next unless attachment.has_css?(".govuk-details__summary") - details = attachment.find(".govuk-details__summary")["data-ga4-event"] + details = attachment.find("details")["data-ga4-event"] actual_tracking = JSON.parse(details) assert_equal actual_tracking["index_section_count"], 2 end diff --git a/test/integration/consultation_test.rb b/test/integration/consultation_test.rb index a1ba7e8a3..f54d2ee72 100644 --- a/test/integration/consultation_test.rb +++ b/test/integration/consultation_test.rb @@ -336,7 +336,7 @@ class ConsultationTest < ActionDispatch::IntegrationTest attachments.each do |attachment| next unless attachment.has_css?(".govuk-details__summary") - details = attachment.find(".govuk-details__summary")["data-ga4-event"] + details = attachment.find("details")["data-ga4-event"] actual_tracking = JSON.parse(details) assert_equal actual_tracking["index_section_count"], 2 end diff --git a/test/integration/publication_test.rb b/test/integration/publication_test.rb index 2e426a5b0..ad1b80821 100644 --- a/test/integration/publication_test.rb +++ b/test/integration/publication_test.rb @@ -192,7 +192,7 @@ class PublicationTest < ActionDispatch::IntegrationTest attachments.each do |attachment| next unless attachment.has_css?(".govuk-details__summary") - details = attachment.find(".govuk-details__summary")["data-ga4-event"] + details = attachment.find("details")["data-ga4-event"] actual_tracking = JSON.parse(details) assert_equal actual_tracking["index_section_count"], 2 end