Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the labels on addresses #3162

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions app/views/claims/select_home_address.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="govuk-grid-column-two-thirds">
<%= 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| %>
<div class="govuk-!-margin-bottom-5">
<h1 class="govuk-heading-xl"><%= t("questions.address.home.title") %></h1>
<h2 class="govuk-heading-l govuk-!-margin-bottom-1">Postcode</h2>
Expand All @@ -27,10 +27,12 @@
<% address = option[:address].gsub(",", "").gsub(" ", "_").downcase %>
<% checked = params.dig(:claim, :address_line_1) == option[:address_line_1] %>

<div class="govuk-radios__item">
<%= 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 %>
</div>
<%= 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 %>
</div>
</fieldset>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion spec/features/early_career_payments_claim_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading