Skip to content

Commit

Permalink
Merge pull request #4278 from alphagov/licence_transaction_finder_fix
Browse files Browse the repository at this point in the history
Set new button text on postcode lookup form
  • Loading branch information
beccapearce authored Oct 14, 2024
2 parents 2897d79 + 798b566 commit 0ca4309
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/helpers/location_form_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module LocationFormHelper
def button_text(publication_format = nil)
case publication_format
when "local_transaction"
when "local_transaction", "licence"
I18n.t("formats.local_transaction.find_council")
else
I18n.t("find")
Expand Down
22 changes: 11 additions & 11 deletions spec/system/licence_transaction_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
)
visit "/find-licences/licence-to-kill"
fill_in("postcode", with: "SW1A 1AA")
click_on("Find")
click_on("Find your local council")
end

it "redirects to the appropriate authority slug" do
Expand Down Expand Up @@ -283,7 +283,7 @@
)
visit "/find-licences/licence-to-kill"
fill_in("postcode", with: "HP20 2QF")
click_on("Find")
click_on("Find your local council")
end

it "redirects to the appropriate authority slug" do
Expand Down Expand Up @@ -349,7 +349,7 @@
)
visit "/find-licences/licence-to-kill"
fill_in("postcode", with: "DT11 0SF")
click_on("Find")
click_on("Find your local council")
end

it "redirects to the appropriate authority slug" do
Expand Down Expand Up @@ -421,7 +421,7 @@
)
visit "/find-licences/licence-to-kill"
fill_in("postcode", with: "SW1A 1AA")
click_on("Find")
click_on("Find your local council")
end

it "shows details for the first licensing authority only" do
Expand All @@ -442,7 +442,7 @@
stub_locations_api_does_not_have_a_bad_postcode("Not valid")
visit "/find-licences/licence-to-kill"
fill_in("postcode", with: "Not valid")
click_on("Find")
click_on("Find your local council")
end

it "prefixes 'Error' in the title element" do
Expand Down Expand Up @@ -477,7 +477,7 @@
stub_locations_api_has_no_location("AB1 2AB")
visit "/find-licences/licence-to-kill"
fill_in("postcode", with: "AB1 2AB")
click_on("Find")
click_on("Find your local council")
end

it "prefixes 'Error' in the title element" do
Expand All @@ -503,7 +503,7 @@
stub_local_links_manager_does_not_have_a_custodian_code(123)
visit "/find-licences/licence-to-kill"
fill_in("postcode", with: "XM4 5HQ")
click_on("Find")
click_on("Find your local council")
end

it "prefixes 'Error' in the title element" do
Expand Down Expand Up @@ -568,7 +568,7 @@
stub_local_links_manager_has_a_local_authority("staffordshire", local_custodian_code: 1234, snac: "41")
visit "/find-licences/licence-to-kill"
fill_in("postcode", with: "ST10 4DB")
click_on("Find")
click_on("Find your local council")
end

it "includes the first licencing authority name only in the title element" do
Expand All @@ -586,7 +586,7 @@
stub_licence_does_not_exist("1071-5-1/41UH")
visit "/find-licences/licence-to-kill"
fill_in("postcode", with: "ST10 4DB")
click_on("Find")
click_on("Find your local council")
end

it "includes contact your council text in the title element" do
Expand Down Expand Up @@ -615,7 +615,7 @@
stub_local_links_manager_has_a_local_authority("Ceechester", local_custodian_code: 3)
visit "/find-licences/licence-to-kill"
fill_in("postcode", with: "CH25 9BJ")
click_on("Find")
click_on("Find your local council")
end

it "includes the select address text in the title element" do
Expand Down Expand Up @@ -660,7 +660,7 @@
stub_local_links_manager_has_a_local_authority("Geechester", local_custodian_code: 7)
visit "/find-licences/licence-to-kill"
fill_in("postcode", with: "CH25 9BJ")
click_on("Find")
click_on("Find your local council")
end

it "includes the select address text in the title element" do
Expand Down

0 comments on commit 0ca4309

Please sign in to comment.