Skip to content

Commit

Permalink
Test for correct places search result and multiple auths page titles
Browse files Browse the repository at this point in the history
  • Loading branch information
hannalaakso committed May 20, 2024
1 parent bb9c569 commit b24664b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/integration/place_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,10 @@ class PlacesTest < ActionDispatch::IntegrationTest
assert_current_url "/passport-interview-office"
end

should "include the search result text in the page title" do
assert page.has_title?("Find a passport interview office: #{I18n.t('formats.local_transaction.search_result')} - GOV.UK", exact: true)
end

should "not display an error message" do
assert page.has_no_content?("Please enter a valid full UK postcode.")
end
Expand Down Expand Up @@ -329,6 +333,10 @@ class PlacesTest < ActionDispatch::IntegrationTest
click_on "Find"
end

should "include the select address text in the page title" do
assert page.has_title?("Find a passport interview office: #{I18n.t('formats.local_transaction.select_address').downcase} - GOV.UK", exact: true)
end

should "display the address chooser" do
assert page.has_content?("House 1")
end
Expand Down

0 comments on commit b24664b

Please sign in to comment.