diff --git a/Gemfile.lock b/Gemfile.lock index 9a1bede0f9..e68dc142a6 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) 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 c4c193898a..5ffb981a2e 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 7fe22ccce7..3e8b84fe32 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 2acc6d4aef..8bcd06e9ab 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 ccf5b637f9..9fdd1baa9e 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 02636e23d3..3eeeb04932 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 bbcf888492..69050e9e11 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 c122afd10c..4cb69c3809 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 681cfc6fe2..fe14e5deb4 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 4000d31cc4..cb8f8a20df 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 b5c7d4e86c..a557c91e53 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 dc3539898a..22eb55c421 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 7e65bb476d..7d79acfa64 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 826f1a01e6..a0fd8adde4 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(