Skip to content

Commit

Permalink
Merge pull request #2257 from DFE-Digital/dependabot/bundler/site_pri…
Browse files Browse the repository at this point in the history
…sm-5.0.2

Bump site_prism from 5.0.1 to 5.0.2
  • Loading branch information
thomasleese authored Jun 12, 2024
2 parents 040fdef + 88cc39a commit 11a9367
Show file tree
Hide file tree
Showing 14 changed files with 29 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion spec/support/autoload/page_objects/govuk_error_summary.rb
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion spec/support/autoload/page_objects/govuk_panel.rb
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion spec/support/autoload/page_objects/govuk_summary_card.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions spec/support/autoload/page_objects/moj_timeline_item.rb
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/system/assessor_interface/creating_note_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions spec/system/assessor_interface/view_timeline_events_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/system/teacher_interface/consent_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion spec/system/teacher_interface/further_information_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion spec/system/teacher_interface/submitting_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 11a9367

Please sign in to comment.