From e1dd27b7dcea3d745969743312c63ee6967962c4 Mon Sep 17 00:00:00 2001 From: Karl Baker Date: Fri, 8 Feb 2019 09:58:36 +0000 Subject: [PATCH 1/3] Upgrade govuk_publishing_components to 13.6.1 This commit upgrades the govuk_publishing_components gem to version `13.6.1`. --- Gemfile | 2 +- Gemfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index acfaefef6..0c9b43ab7 100644 --- a/Gemfile +++ b/Gemfile @@ -17,7 +17,7 @@ gem 'gds-api-adapters', '~> 57.2' gem 'govuk_ab_testing', '~> 2.4' gem 'govuk_app_config', '~> 1.11' gem 'govuk_frontend_toolkit', '~> 8.1.0' -gem 'govuk_publishing_components', '~> 13.5.2' +gem 'govuk_publishing_components', '~> 13.6.1' gem 'plek', '~> 2.1' gem 'slimmer', '~> 13.1' diff --git a/Gemfile.lock b/Gemfile.lock index 8bb4454e1..2b35ae197 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -129,7 +129,7 @@ GEM govuk_frontend_toolkit (8.1.0) railties (>= 3.1.0) sass (>= 3.2.0) - govuk_publishing_components (13.5.2) + govuk_publishing_components (13.6.1) govspeak (>= 5.0.3) govuk_app_config govuk_frontend_toolkit @@ -140,7 +140,7 @@ GEM govuk_schemas (3.2.0) json-schema (~> 2.8.0) hashdiff (0.3.7) - highline (2.0.0) + highline (2.0.1) htmlentities (4.3.4) http-cookie (1.0.3) domain_name (~> 0.5) @@ -186,7 +186,7 @@ GEM minitest (5.11.3) mocha (1.8.0) metaclass (~> 0.0.1) - money (6.13.1) + money (6.13.2) i18n (>= 0.6.4, <= 2) multipart-post (2.0.0) netrc (0.11.0) @@ -370,7 +370,7 @@ DEPENDENCIES govuk_ab_testing (~> 2.4) govuk_app_config (~> 1.11) govuk_frontend_toolkit (~> 8.1.0) - govuk_publishing_components (~> 13.5.2) + govuk_publishing_components (~> 13.6.1) govuk_schemas (~> 3.2) htmlentities (~> 4.3) jasmine-rails From 5a71f64e2c6ffbe0ecfbbac130f72568dcb13cdb Mon Sep 17 00:00:00 2001 From: Karl Baker Date: Fri, 8 Feb 2019 10:42:42 +0000 Subject: [PATCH 2/3] Fix incorrect assertions on error summary This commit fixes the assertions made in `choose_sign_in_test.rb` on the error-summary component provided by govuk_publishing_components. This component was upgraded in version `13.5.3` to use govuk-frontend styles, which in turn broke the assertions made here (see PR https://github.com/alphagov/govuk_publishing_components/pull/692 for details). Solo: @karlbaker02 --- test/integration/service_sign_in/choose_sign_in_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/integration/service_sign_in/choose_sign_in_test.rb b/test/integration/service_sign_in/choose_sign_in_test.rb index 9548ebfc8..fda684a9a 100644 --- a/test/integration/service_sign_in/choose_sign_in_test.rb +++ b/test/integration/service_sign_in/choose_sign_in_test.rb @@ -55,9 +55,9 @@ class ChooseSignInTest < ActionDispatch::IntegrationTest click_on 'Continue' - assert page.has_css?(".gem-c-error-summary") - assert page.has_css?(".gem-c-error-summary__title", text: 'You haven’t selected an option') - assert page.has_css?(".gem-c-error-summary__link[href='#option-0']", text: 'Please select an option') + assert page.has_css?(".govuk-error-summary") + assert page.has_css?(".govuk-error-summary__title", text: 'You haven’t selected an option') + assert page.has_css?("ul li a:first-of-type[href='#option-0']", text: 'Please select an option') # Make sure the id is the same as the link href so that they'll link together properly. assert page.has_css?(".gem-c-radio input[id='option-0'][value='use-government-gateway']", visible: false) From cf4c12b9d4328184cb80a62928b8e21eb298ae30 Mon Sep 17 00:00:00 2001 From: Karl Baker Date: Fri, 8 Feb 2019 11:15:07 +0000 Subject: [PATCH 3/3] Update test to make it less tied to changes in publishing components This commit updates the test `renders errors correctly` to make it less dependent on styling changes in `govuk_publishing_components` - this is how the tests broke when upgrading from `13.5.2` to `13.5.3`. --- test/integration/service_sign_in/choose_sign_in_test.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/test/integration/service_sign_in/choose_sign_in_test.rb b/test/integration/service_sign_in/choose_sign_in_test.rb index fda684a9a..5bd810a57 100644 --- a/test/integration/service_sign_in/choose_sign_in_test.rb +++ b/test/integration/service_sign_in/choose_sign_in_test.rb @@ -55,9 +55,8 @@ class ChooseSignInTest < ActionDispatch::IntegrationTest click_on 'Continue' - assert page.has_css?(".govuk-error-summary") - assert page.has_css?(".govuk-error-summary__title", text: 'You haven’t selected an option') - assert page.has_css?("ul li a:first-of-type[href='#option-0']", text: 'Please select an option') + assert page.has_text?('You haven’t selected an option') + assert page.has_text?('Please select an option') # Make sure the id is the same as the link href so that they'll link together properly. assert page.has_css?(".gem-c-radio input[id='option-0'][value='use-government-gateway']", visible: false)