diff --git a/app/views/claims/select_home_address.html.erb b/app/views/claims/select_home_address.html.erb index 59328f313f..59b825c47b 100644 --- a/app/views/claims/select_home_address.html.erb +++ b/app/views/claims/select_home_address.html.erb @@ -4,7 +4,7 @@
<%= render("shared/error_summary", instance: @form, errored_field_id_overrides: { "address": "#{@address_data.first[:address].gsub(",", "").gsub(" ", "_").downcase}"}) if @form.errors.any? %> - <%= form_for @form, url: claim_path(current_journey_routing_name) do |form| %> + <%= form_for @form, url: claim_path(current_journey_routing_name), builder: GOVUKDesignSystemFormBuilder::FormBuilder do |form| %>

<%= t("questions.address.home.title") %>

Postcode

@@ -27,10 +27,12 @@ <% address = option[:address].gsub(",", "").gsub(" ", "_").downcase %> <% checked = params.dig(:claim, :address_line_1) == option[:address_line_1] %> -
- <%= form.radio_button :address, [option[:address], option[:address_line_1], option[:address_line_2], option[:address_line_3], option[:postcode]].join(":"), { checked:, class: "govuk-radios__input", id: address } %> - <%= form.label address, "#{option[:address]}", class: "govuk-label govuk-radios__label", id: address %> -
+ <%= form.govuk_radio_button( + :address, + [option[:address], option[:address_line_1], option[:address_line_2], option[:address_line_3], option[:postcode]].join(":"), + label: { text: option[:address] }, + checked: checked + ) %> <% end %>
diff --git a/spec/features/auto_populating_home_address_from_postcode_search_spec.rb b/spec/features/auto_populating_home_address_from_postcode_search_spec.rb index 9b7e91c922..b3e5b7e454 100644 --- a/spec/features/auto_populating_home_address_from_postcode_search_spec.rb +++ b/spec/features/auto_populating_home_address_from_postcode_search_spec.rb @@ -301,7 +301,7 @@ # - Select your home address expect(page).to have_text(I18n.t("questions.address.home.title")) - choose "flat_11_millbrook_tower_windermere_avenue_southampton_so16_9fx" + choose "Flat 11, Millbrook Tower, Windermere Avenue, Southampton, SO16 9FX" click_on "Continue" journey_session.reload @@ -445,7 +445,7 @@ expect(page).to have_text("6, Wearside Road, London, SE13 7UN") expect(page).to have_link(href: claim_path(Journeys::AdditionalPaymentsForTeaching::ROUTING_NAME, "address")) - choose "5_wearside_road_london_se13_7un" + choose "5, Wearside Road, London, SE13 7UN" click_on "Continue" journey_session.reload diff --git a/spec/features/combined_teacher_claim_journey_with_teacher_id_check_email_spec.rb b/spec/features/combined_teacher_claim_journey_with_teacher_id_check_email_spec.rb index 733201f095..94a2692259 100644 --- a/spec/features/combined_teacher_claim_journey_with_teacher_id_check_email_spec.rb +++ b/spec/features/combined_teacher_claim_journey_with_teacher_id_check_email_spec.rb @@ -158,7 +158,7 @@ def navigate_to_check_email_page(school:) # - Select your home address expect(page).to have_text(I18n.t("questions.address.home.title")) - choose "flat_11_millbrook_tower_windermere_avenue_southampton_so16_9fx" + choose "Flat 11, Millbrook Tower, Windermere Avenue, Southampton, SO16 9FX" click_on "Continue" end end diff --git a/spec/features/early_career_payments_claim_spec.rb b/spec/features/early_career_payments_claim_spec.rb index 59267e83f0..98e559659c 100644 --- a/spec/features/early_career_payments_claim_spec.rb +++ b/spec/features/early_career_payments_claim_spec.rb @@ -881,7 +881,7 @@ # - Select your home address expect(page).to have_text(I18n.t("questions.address.home.title")) - choose "flat_11_millbrook_tower_windermere_avenue_southampton_so16_9fx" + choose "Flat 11, Millbrook Tower, Windermere Avenue, Southampton, SO16 9FX" click_on "Continue" # - What is your address diff --git a/spec/features/tslr_claim_journey_with_teacher_id_check_email_spec.rb b/spec/features/tslr_claim_journey_with_teacher_id_check_email_spec.rb index d7155eaf6a..deee761628 100644 --- a/spec/features/tslr_claim_journey_with_teacher_id_check_email_spec.rb +++ b/spec/features/tslr_claim_journey_with_teacher_id_check_email_spec.rb @@ -180,7 +180,7 @@ def navigate_to_check_email_page(school:) # - Select your home address expect(page).to have_text(I18n.t("questions.address.home.title")) - choose "flat_11_millbrook_tower_windermere_avenue_southampton_so16_9fx" + choose "Flat 11, Millbrook Tower, Windermere Avenue, Southampton, SO16 9FX" click_on "Continue" end diff --git a/spec/features/tslr_claim_journey_with_teacher_id_trn_spec.rb b/spec/features/tslr_claim_journey_with_teacher_id_trn_spec.rb index acb9ccaae7..dc237be2c0 100644 --- a/spec/features/tslr_claim_journey_with_teacher_id_trn_spec.rb +++ b/spec/features/tslr_claim_journey_with_teacher_id_trn_spec.rb @@ -94,7 +94,7 @@ def navigate_to_teacher_reference_number_page(school:) # - Select your home address expect(page).to have_text(I18n.t("questions.address.home.title")) - choose "flat_11_millbrook_tower_windermere_avenue_southampton_so16_9fx" + choose "Flat 11, Millbrook Tower, Windermere Avenue, Southampton, SO16 9FX" click_on "Continue" # - select-email page diff --git a/spec/support/get_a_teacher_relocation_payment/step_helpers.rb b/spec/support/get_a_teacher_relocation_payment/step_helpers.rb index ce03e0d3ca..fe41031663 100644 --- a/spec/support/get_a_teacher_relocation_payment/step_helpers.rb +++ b/spec/support/get_a_teacher_relocation_payment/step_helpers.rb @@ -160,7 +160,7 @@ def and_i_complete_the_postcode_step click_on "Search" expect(page).to have_text("Select an address") - choose "flat_1_millbrook_tower_windermere_avenue_southampton_so16_9fx" + choose "Flat 1, Millbrook Tower, Windermere Avenue, Southampton, SO16 9FX" click_on "Continue" end