Browse Source

update retirement soft validation pages and copy in en.yml to reflect changes in english retirement age

pull/2384/head
Arthur Campbell 2 years ago
parent
commit
e3c821b923
  1. 8
      app/models/form/lettings/pages/lead_tenant_over_retirement_value_check.rb
  2. 12
      app/models/form/lettings/pages/person_over_retirement_value_check.rb
  3. 4
      config/locales/en.yml
  4. 24
      spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb

8
app/models/form/lettings/pages/lead_tenant_over_retirement_value_check.rb

@ -14,14 +14,6 @@ class Form::Lettings::Pages::LeadTenantOverRetirementValueCheck < ::Form::Page
} }
@informative_text = { @informative_text = {
"translation" => "soft_validations.retirement.max.hint_text", "translation" => "soft_validations.retirement.max.hint_text",
"arguments" => [
{ "key" => "plural_gender_for_person_1", "label" => false, "i18n_template" => "gender" },
{
"key" => "retirement_age_for_person_1",
"label" => false,
"i18n_template" => "age",
},
],
} }
end end

12
app/models/form/lettings/pages/person_over_retirement_value_check.rb

@ -14,18 +14,6 @@ class Form::Lettings::Pages::PersonOverRetirementValueCheck < ::Form::Page
} }
@informative_text = { @informative_text = {
"translation" => "soft_validations.retirement.max.hint_text", "translation" => "soft_validations.retirement.max.hint_text",
"arguments" => [
{
"key" => "plural_gender_for_person_#{person_index}",
"label" => false,
"i18n_template" => "gender",
},
{
"key" => "retirement_age_for_person_#{person_index}",
"label" => false,
"i18n_template" => "age",
},
],
} }
@person_index = person_index @person_index = person_index
end end

4
config/locales/en.yml

@ -691,10 +691,10 @@ Make sure these answers are correct."
retirement: retirement:
min: min:
title: "You told us this person is aged %{age} years and retired." title: "You told us this person is aged %{age} years and retired."
hint_text: "The minimum expected retirement age for %{gender} in England is %{age}." hint_text: "The minimum expected retirement age in England is 66."
max: max:
title: "You told us this person is %{age} or over and not retired" title: "You told us this person is %{age} or over and not retired"
hint_text: "The minimum expected retirement age for %{gender} in England is %{age}." hint_text: "The minimum expected retirement age in England is 66."
extra_borrowing: extra_borrowing:
title_text: "You told us that the mortgage and deposit total is %{mortgage_and_deposit_total}" title_text: "You told us that the mortgage and deposit total is %{mortgage_and_deposit_total}"
hint_text: "This is higher than the purchase price minus the discount." hint_text: "This is higher than the purchase price minus the discount."

24
spec/models/form/lettings/pages/person_over_retirement_value_check_spec.rb

@ -46,18 +46,6 @@ RSpec.describe Form::Lettings::Pages::PersonOverRetirementValueCheck, type: :mod
it "has the correct informative_text" do it "has the correct informative_text" do
expect(page.informative_text).to eq({ expect(page.informative_text).to eq({
"translation" => "soft_validations.retirement.max.hint_text", "translation" => "soft_validations.retirement.max.hint_text",
"arguments" => [
{
"key" => "plural_gender_for_person_2",
"label" => false,
"i18n_template" => "gender",
},
{
"key" => "retirement_age_for_person_2",
"label" => false,
"i18n_template" => "age",
},
],
}) })
end end
end end
@ -87,18 +75,6 @@ RSpec.describe Form::Lettings::Pages::PersonOverRetirementValueCheck, type: :mod
it "has the correct informative_text" do it "has the correct informative_text" do
expect(page.informative_text).to eq({ expect(page.informative_text).to eq({
"translation" => "soft_validations.retirement.max.hint_text", "translation" => "soft_validations.retirement.max.hint_text",
"arguments" => [
{
"key" => "plural_gender_for_person_3",
"label" => false,
"i18n_template" => "gender",
},
{
"key" => "retirement_age_for_person_3",
"label" => false,
"i18n_template" => "age",
},
],
}) })
end end
end end

Loading…
Cancel
Save