From 9825da433465699479d35735651a4368b17bcd4d Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 10 Jun 2024 17:14:59 +0100 Subject: [PATCH] Add a link back to landing page to try another postcode --- app/views/electoral/results.html.erb | 1 + config/locales/cy.yml | 1 + config/locales/en.yml | 3 ++- test/integration/electoral_look_up_test.rb | 6 +++++- 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/views/electoral/results.html.erb b/app/views/electoral/results.html.erb index 116b64b24c..fbefa0017d 100644 --- a/app/views/electoral/results.html.erb +++ b/app/views/electoral/results.html.erb @@ -21,6 +21,7 @@

<%= t('electoral.service.matched_postcode_html', postcode: @postcode.sanitized_postcode, electoral_service_name: @presenter.electoral_service_name) %>

+

<%= t('electoral.service.search_postcode_html') %>

<% end %> <% ga4_link = { diff --git a/config/locales/cy.yml b/config/locales/cy.yml index dff9b83546..0997332ac9 100644 --- a/config/locales/cy.yml +++ b/config/locales/cy.yml @@ -664,6 +664,7 @@ cy: service: description: Os oes gennych gwestiwn am eich cerdyn pleidleisio, eich man pleidleisio, neu am ddychwelyd eich papur pleidleisio drwy'r post, cysylltwch â'ch cyngor." matched_postcode_html: Rydyn ni wedi paru'r cod post %{postcode} i %{electoral_service_name}. + search_postcode_html: Chwiliwch am god post gwahanol title: Eich cyngor lleol error: find: Ffeindio diff --git a/config/locales/en.yml b/config/locales/en.yml index 092edc0926..99580d5302 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -371,7 +371,8 @@ en: title: Get help with electoral registration service: description: For questions about your poll card, polling place, or about returning your postal voting ballot, contact your council." - matched_postcode_html: We've matched the postcode %{postcode} to %{electoral_service_name}. + matched_postcode_html: We’ve matched the postcode %{postcode} to %{electoral_service_name}. + search_postcode_html: Search for a different postcode title: Your local council error: Error find: Find diff --git a/test/integration/electoral_look_up_test.rb b/test/integration/electoral_look_up_test.rb index bd335813bb..51805821f1 100644 --- a/test/integration/electoral_look_up_test.rb +++ b/test/integration/electoral_look_up_test.rb @@ -122,7 +122,11 @@ def search_for(postcode:) # Click on one of the suggested addresses stub_api_address_lookup("1234", response: api_response) click_button "Continue" - assert page.has_selector?("p", text: "We've matched the postcode to Cardiff Council") + assert page.has_selector?("p", text: "We’ve matched the postcode to Cardiff Council") + assert page.has_link?( + "Search for a different postcode", + href: "/contact-electoral-registration-office", + ) end end