From 4eff1cbde0a8492978ccb1bcbbab4e228c4c9385 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jun 2024 14:23:03 +0000 Subject: [PATCH 1/2] Bump site_prism from 5.0.1 to 5.0.2 Bumps [site_prism](https://github.com/site-prism/site_prism) from 5.0.1 to 5.0.2. - [Release notes](https://github.com/site-prism/site_prism/releases) - [Changelog](https://github.com/site-prism/site_prism/blob/main/CHANGELOG.md) - [Commits](https://github.com/site-prism/site_prism/compare/v5.0.1...v5.0.2) --- updated-dependencies: - dependency-name: site_prism dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 9a1bede0f..e68dc142a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -557,7 +557,7 @@ GEM multi_json (~> 1.10) simpleidn (0.2.1) unf (~> 0.1.4) - site_prism (5.0.1) + site_prism (5.0.2) addressable (~> 2.8, >= 2.8.1) capybara (~> 3.31) site_prism-all_there (> 2, < 5) From 88cc39a71a61788e60f76780c7bb8b470b06413a Mon Sep 17 00:00:00 2001 From: Thomas Leese Date: Wed, 12 Jun 2024 21:02:14 +0100 Subject: [PATCH 2/2] Rename site_prism elements named title This is an invalid name in the latest version of site_prism so they'll have to be renamed to something else, in more cases "heading". --- .../assessor_interface/check_qualifications.rb | 4 +++- .../assessor_interface/check_work_history.rb | 1 - .../autoload/page_objects/govuk_error_summary.rb | 4 +++- spec/support/autoload/page_objects/govuk_panel.rb | 4 +++- .../autoload/page_objects/govuk_summary_card.rb | 2 +- .../support/autoload/page_objects/moj_timeline_item.rb | 6 ++++-- .../checking_submitted_details_spec.rb | 5 ++++- .../assessor_interface/completing_assessment_spec.rb | 2 +- spec/system/assessor_interface/creating_note_spec.rb | 2 +- .../assessor_interface/view_timeline_events_spec.rb | 10 +++++----- spec/system/teacher_interface/consent_spec.rb | 2 +- .../teacher_interface/further_information_spec.rb | 2 +- spec/system/teacher_interface/submitting_spec.rb | 2 +- 13 files changed, 28 insertions(+), 18 deletions(-) diff --git a/spec/support/autoload/page_objects/assessor_interface/check_qualifications.rb b/spec/support/autoload/page_objects/assessor_interface/check_qualifications.rb index c4c193898..5ffb981a2 100644 --- a/spec/support/autoload/page_objects/assessor_interface/check_qualifications.rb +++ b/spec/support/autoload/page_objects/assessor_interface/check_qualifications.rb @@ -1,8 +1,10 @@ +# frozen_string_literal: true + module PageObjects module AssessorInterface class QualificationCard < SitePrism::Section element :heading, "h2" - element :title, + element :title_value, "dl.govuk-summary-list > div:nth-of-type(1) > dd:nth-of-type(1)" end diff --git a/spec/support/autoload/page_objects/assessor_interface/check_work_history.rb b/spec/support/autoload/page_objects/assessor_interface/check_work_history.rb index 7fe22ccce..3e8b84fe3 100644 --- a/spec/support/autoload/page_objects/assessor_interface/check_work_history.rb +++ b/spec/support/autoload/page_objects/assessor_interface/check_work_history.rb @@ -1,7 +1,6 @@ module PageObjects module AssessorInterface class WorkHistoryCard < GovukSummaryCard - element :heading, "h2" element :school_name, "dl.govuk-summary-list > div:nth-of-type(1) > dd:nth-of-type(1)" end diff --git a/spec/support/autoload/page_objects/govuk_error_summary.rb b/spec/support/autoload/page_objects/govuk_error_summary.rb index 2acc6d4ae..8bcd06e9a 100644 --- a/spec/support/autoload/page_objects/govuk_error_summary.rb +++ b/spec/support/autoload/page_objects/govuk_error_summary.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + module PageObjects class GovukErrorSummary < SitePrism::Section - element :title, ".govuk-error-summary__title" + element :heading, ".govuk-error-summary__title" element :body, ".govuk-error-summary__body" end end diff --git a/spec/support/autoload/page_objects/govuk_panel.rb b/spec/support/autoload/page_objects/govuk_panel.rb index ccf5b637f..9fdd1baa9 100644 --- a/spec/support/autoload/page_objects/govuk_panel.rb +++ b/spec/support/autoload/page_objects/govuk_panel.rb @@ -1,6 +1,8 @@ +# frozen_string_literal: true + module PageObjects class GovukPanel < SitePrism::Section - element :title, ".govuk-panel__title" + element :heading, ".govuk-panel__title" element :body, ".govuk-panel__body" end end diff --git a/spec/support/autoload/page_objects/govuk_summary_card.rb b/spec/support/autoload/page_objects/govuk_summary_card.rb index 02636e23d..3eeeb0493 100644 --- a/spec/support/autoload/page_objects/govuk_summary_card.rb +++ b/spec/support/autoload/page_objects/govuk_summary_card.rb @@ -2,7 +2,7 @@ module PageObjects class GovukSummaryCard < SitePrism::Section - element :title, ".govuk-summary-card__title" + element :heading, ".govuk-summary-card__title" section :actions, ".govuk-summary-card__actions" do sections :items, ".govuk-summary-card__action" do diff --git a/spec/support/autoload/page_objects/moj_timeline_item.rb b/spec/support/autoload/page_objects/moj_timeline_item.rb index bbcf88849..69050e9e1 100644 --- a/spec/support/autoload/page_objects/moj_timeline_item.rb +++ b/spec/support/autoload/page_objects/moj_timeline_item.rb @@ -1,10 +1,12 @@ +# frozen_string_literal: true + module PageObjects class MojTimelineItem < SitePrism::Section - element :title, ".moj-timeline__title" + element :heading, ".moj-timeline__title" element :byline, ".moj-timeline__byline" element :date, ".moj-timeline__date" element :description, ".moj-timeline__description" - expected_elements :title, :byline, :date, :description + expected_elements :heading, :byline, :date, :description end end diff --git a/spec/system/assessor_interface/checking_submitted_details_spec.rb b/spec/system/assessor_interface/checking_submitted_details_spec.rb index c122afd10..4cb69c380 100644 --- a/spec/system/assessor_interface/checking_submitted_details_spec.rb +++ b/spec/system/assessor_interface/checking_submitted_details_spec.rb @@ -281,7 +281,10 @@ def then_i_see_the_qualifications teaching_qualification = application_form.qualifications.find(&:is_teaching?) expect( - assessor_check_qualifications_page.teaching_qualification.title.text, + assessor_check_qualifications_page + .teaching_qualification + .title_value + .text, ).to eq(teaching_qualification.title) end diff --git a/spec/system/assessor_interface/completing_assessment_spec.rb b/spec/system/assessor_interface/completing_assessment_spec.rb index 681cfc6fe..fe14e5deb 100644 --- a/spec/system/assessor_interface/completing_assessment_spec.rb +++ b/spec/system/assessor_interface/completing_assessment_spec.rb @@ -422,7 +422,7 @@ def and_i_click_view_timeline def then_i_see_application_declined declined_timeline_event = assessor_timeline_page.timeline_items.find do |timeline_event| - timeline_event.title.text.include?("Application declined") + timeline_event.heading.text.include?("Application declined") end expect(declined_timeline_event).to_not be_nil diff --git a/spec/system/assessor_interface/creating_note_spec.rb b/spec/system/assessor_interface/creating_note_spec.rb index 4000d31cc..cb8f8a20d 100644 --- a/spec/system/assessor_interface/creating_note_spec.rb +++ b/spec/system/assessor_interface/creating_note_spec.rb @@ -37,7 +37,7 @@ def when_i_create_a_note def and_i_see_the_note_timeline_event timeline_item = assessor_timeline_page.timeline_items.first - expect(timeline_item.title).to have_content("Note created") + expect(timeline_item.heading).to have_content("Note created") expect(timeline_item.description).to have_content("A note.") end diff --git a/spec/system/assessor_interface/view_timeline_events_spec.rb b/spec/system/assessor_interface/view_timeline_events_spec.rb index b5c7d4e86..a557c91e5 100644 --- a/spec/system/assessor_interface/view_timeline_events_spec.rb +++ b/spec/system/assessor_interface/view_timeline_events_spec.rb @@ -36,13 +36,13 @@ def then_i_see_the_timeline ) expect(assessor_timeline_page).to have_timeline_items - expect(assessor_timeline_page.timeline_items.first.title).to have_content( + expect(assessor_timeline_page.timeline_items.first.heading).to have_content( "Note created", ) - expect(assessor_timeline_page.timeline_items.second.title).to have_content( - "Stage changed", - ) - expect(assessor_timeline_page.timeline_items.third.title).to have_content( + expect( + assessor_timeline_page.timeline_items.second.heading, + ).to have_content("Stage changed") + expect(assessor_timeline_page.timeline_items.third.heading).to have_content( "Assessor assigned", ) end diff --git a/spec/system/teacher_interface/consent_spec.rb b/spec/system/teacher_interface/consent_spec.rb index dc3539898..22eb55c42 100644 --- a/spec/system/teacher_interface/consent_spec.rb +++ b/spec/system/teacher_interface/consent_spec.rb @@ -129,7 +129,7 @@ def when_i_click_submit end def and_i_see_the_consent_submitted_status - expect(teacher_submitted_application_page.panel.title.text).to eq( + expect(teacher_submitted_application_page.panel.heading.text).to eq( "Consent documents successfully submitted", ) expect(teacher_submitted_application_page.panel.body.text).to eq( diff --git a/spec/system/teacher_interface/further_information_spec.rb b/spec/system/teacher_interface/further_information_spec.rb index 7e65bb476..7d79acfa6 100644 --- a/spec/system/teacher_interface/further_information_spec.rb +++ b/spec/system/teacher_interface/further_information_spec.rb @@ -176,7 +176,7 @@ def when_i_submit_the_further_information end def and_i_see_the_further_information_received_information - expect(teacher_submitted_application_page.panel.title.text).to eq( + expect(teacher_submitted_application_page.panel.heading.text).to eq( "Further information successfully submitted", ) expect(teacher_submitted_application_page.panel.body.text).to eq( diff --git a/spec/system/teacher_interface/submitting_spec.rb b/spec/system/teacher_interface/submitting_spec.rb index 826f1a01e..a0fd8adde 100644 --- a/spec/system/teacher_interface/submitting_spec.rb +++ b/spec/system/teacher_interface/submitting_spec.rb @@ -46,7 +46,7 @@ def when_i_confirm_i_have_no_sanctions end def and_i_see_the_submitted_application_information - expect(teacher_submitted_application_page.panel.title.text).to eq( + expect(teacher_submitted_application_page.panel.heading.text).to eq( "Application complete", ) expect(teacher_submitted_application_page.panel.body.text).to eq(