Browse Source

CLDC-3656 Extract household characteristics soft validations (#2707)

* Extract retirement confirmation questions

* Extract old persons shared ownership confirmation questions

* Extract income confirmation questions

* Extract buyer live-in value check page and question copy to translation files

* Extract student not a child confirmation questions and page copy to translation files

* Extract partner under 16 value check page and question copy to translation files

* Extract partner under 16 value check page and question copy to translation files
pull/2702/head
kosiakkatrina 2 years ago committed by Kat
parent
commit
f54501b69e
  1. 5
      app/models/form/sales/pages/buyer_live_in_value_check.rb
  2. 3
      app/models/form/sales/pages/multiple_partners_value_check.rb
  3. 5
      app/models/form/sales/pages/not_retired_value_check.rb
  4. 5
      app/models/form/sales/pages/old_persons_shared_ownership_value_check.rb
  5. 3
      app/models/form/sales/pages/partner_under_16_value_check.rb
  6. 3
      app/models/form/sales/pages/person_student_not_child_value_check.rb
  7. 3
      app/models/form/sales/pages/retirement_value_check.rb
  8. 3
      app/models/form/sales/questions/buyer_live_in_value_check.rb
  9. 3
      app/models/form/sales/questions/multiple_partners_value_check.rb
  10. 3
      app/models/form/sales/questions/not_retired_value_check.rb
  11. 3
      app/models/form/sales/questions/old_persons_shared_ownership_value_check.rb
  12. 3
      app/models/form/sales/questions/partner_under_16_value_check.rb
  13. 3
      app/models/form/sales/questions/person_student_not_child_value_check.rb
  14. 3
      app/models/form/sales/questions/retirement_value_check.rb
  15. 17
      config/locales/en.yml
  16. 63
      config/locales/forms/2023/sales/soft_validations.en.yml
  17. 63
      config/locales/forms/2024/sales/soft_validations.en.yml
  18. 7
      spec/models/form/sales/pages/buyer_live_in_value_check_spec.rb
  19. 7
      spec/models/form/sales/pages/multiple_partners_value_check_spec.rb
  20. 9
      spec/models/form/sales/pages/old_persons_shared_ownership_value_check_spec.rb
  21. 15
      spec/models/form/sales/pages/partner_under16_value_check_spec.rb
  22. 5
      spec/models/form/sales/pages/person_student_not_child_value_check_spec.rb
  23. 15
      spec/models/form/sales/pages/retirement_value_check_spec.rb

5
app/models/form/sales/pages/buyer_live_in_value_check.rb

@ -6,12 +6,13 @@ class Form::Sales::Pages::BuyerLiveInValueCheck < Form::Sales::Pages::Person
"buyer#{person_index}_livein_wrong_for_ownership_type?" => true, "buyer#{person_index}_livein_wrong_for_ownership_type?" => true,
}, },
] ]
@copy_key = "sales.soft_validations.buyer_livein_value_check.buyer#{person_index}"
@title_text = { @title_text = {
"translation" => "soft_validations.buyer#{person_index}_livein_wrong_for_ownership_type.title_text", "translation" => "forms.#{form.start_date.year}.#{@copy_key}.title_text",
"arguments" => [{ "key" => "ownership_scheme", "label" => false, "i18n_template" => "ownership_scheme" }], "arguments" => [{ "key" => "ownership_scheme", "label" => false, "i18n_template" => "ownership_scheme" }],
} }
@informative_text = { @informative_text = {
"translation" => "soft_validations.buyer#{person_index}_livein_wrong_for_ownership_type.hint_text", "translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text",
"arguments" => [{ "key" => "ownership_scheme", "label" => false, "i18n_template" => "ownership_scheme" }], "arguments" => [{ "key" => "ownership_scheme", "label" => false, "i18n_template" => "ownership_scheme" }],
} }
end end

3
app/models/form/sales/pages/multiple_partners_value_check.rb

@ -6,9 +6,10 @@ class Form::Sales::Pages::MultiplePartnersValueCheck < Form::Sales::Pages::Perso
"multiple_partners?" => true, "multiple_partners?" => true,
}, },
] ]
@copy_key = "sales.soft_validations.multiple_partners_value_check"
@person_index = person_index @person_index = person_index
@title_text = { @title_text = {
"translation" => "soft_validations.multiple_partners_sales.title", "translation" => "forms.#{form.start_date.year}.#{@copy_key}.title_text",
"arguments" => [], "arguments" => [],
} }
@informative_text = {} @informative_text = {}

5
app/models/form/sales/pages/not_retired_value_check.rb

@ -7,11 +7,12 @@ class Form::Sales::Pages::NotRetiredValueCheck < Form::Sales::Pages::Person
}, },
] ]
@person_index = person_index @person_index = person_index
@copy_key = "sales.soft_validations.retirement_value_check.max"
@title_text = { @title_text = {
"translation" => "soft_validations.retirement.max.title", "translation" => "forms.#{form.start_date.year}.#{@copy_key}.title_text",
} }
@informative_text = { @informative_text = {
"translation" => "soft_validations.retirement.max.hint_text", "translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text",
} }
end end

5
app/models/form/sales/pages/old_persons_shared_ownership_value_check.rb

@ -1,12 +1,13 @@
class Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck < ::Form::Page class Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck < ::Form::Page
def initialize(id, hsh, subsection, joint_purchase:) def initialize(id, hsh, subsection, joint_purchase:)
super(id, hsh, subsection) super(id, hsh, subsection)
@copy_key = "sales.soft_validations.old_persons_shared_ownership_value_check"
@title_text = { @title_text = {
"translation" => "soft_validations.old_persons_shared_ownership.title_text.#{joint_purchase ? 'two' : 'one'}", "translation" => "forms.#{form.start_date.year}.#{@copy_key}.title_text.#{joint_purchase ? 'joint_purchase' : 'not_joint_purchase'}",
"arguments" => [], "arguments" => [],
} }
@informative_text = { @informative_text = {
"translation" => "soft_validations.old_persons_shared_ownership.hint_text", "translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text",
"arguments" => [], "arguments" => [],
} }
@joint_purchase = joint_purchase @joint_purchase = joint_purchase

3
app/models/form/sales/pages/partner_under_16_value_check.rb

@ -6,9 +6,10 @@ class Form::Sales::Pages::PartnerUnder16ValueCheck < Form::Sales::Pages::Person
"person_#{person_index}_partner_under_16?" => true, "person_#{person_index}_partner_under_16?" => true,
}, },
] ]
@copy_key = "sales.soft_validations.partner_under_16_value_check"
@person_index = person_index @person_index = person_index
@title_text = { @title_text = {
"translation" => "soft_validations.partner_under_16_sales.title", "translation" => "forms.#{form.start_date.year}.#{@copy_key}.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age#{person_index}", "key" => "age#{person_index}",

3
app/models/form/sales/pages/person_student_not_child_value_check.rb

@ -6,9 +6,10 @@ class Form::Sales::Pages::PersonStudentNotChildValueCheck < Form::Sales::Pages::
"person_#{person_index}_student_not_child?" => true, "person_#{person_index}_student_not_child?" => true,
}, },
] ]
@copy_key = "sales.soft_validations.student_not_child_value_check"
@person_index = person_index @person_index = person_index
@title_text = { @title_text = {
"translation" => "soft_validations.student_not_child.title_text", "translation" => "forms.#{form.start_date.year}.#{@copy_key}.title_text",
} }
@informative_text = {} @informative_text = {}
end end

3
app/models/form/sales/pages/retirement_value_check.rb

@ -7,8 +7,9 @@ class Form::Sales::Pages::RetirementValueCheck < Form::Sales::Pages::Person
}, },
] ]
@person_index = person_index @person_index = person_index
@copy_key = "sales.soft_validations.retirement_value_check.min"
@title_text = { @title_text = {
"translation" => "soft_validations.retirement.min.title", "translation" => "forms.#{form.start_date.year}.#{@copy_key}.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age#{person_index}", "key" => "age#{person_index}",

3
app/models/form/sales/questions/buyer_live_in_value_check.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::BuyerLiveInValueCheck < ::Form::Question
def initialize(id, hsh, page, person_index:) def initialize(id, hsh, page, person_index:)
super(id, hsh, page) super(id, hsh, page)
@id = "buyer_livein_value_check" @id = "buyer_livein_value_check"
@check_answer_label = "Buyer live in confirmation" @copy_key = "sales.soft_validations.buyer_livein_value_check.buyer#{person_index}"
@type = "interruption_screen" @type = "interruption_screen"
@answer_options = { @answer_options = {
"0" => { "value" => "Yes" }, "0" => { "value" => "Yes" },
@ -19,6 +19,5 @@ class Form::Sales::Questions::BuyerLiveInValueCheck < ::Form::Question
], ],
} }
@check_answers_card_number = person_index @check_answers_card_number = person_index
@header = "Are you sure this is correct?"
end end
end end

3
app/models/form/sales/questions/multiple_partners_value_check.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::MultiplePartnersValueCheck < ::Form::Question
def initialize(id, hsh, page, person_index:) def initialize(id, hsh, page, person_index:)
super(id, hsh, page) super(id, hsh, page)
@id = "multiple_partners_value_check" @id = "multiple_partners_value_check"
@check_answer_label = "Multiple partners confirmation" @copy_key = "sales.soft_validations.multiple_partners_value_check"
@type = "interruption_screen" @type = "interruption_screen"
@answer_options = { @answer_options = {
"0" => { "value" => "Yes" }, "0" => { "value" => "Yes" },
@ -19,6 +19,5 @@ class Form::Sales::Questions::MultiplePartnersValueCheck < ::Form::Question
], ],
} }
@check_answers_card_number = person_index @check_answers_card_number = person_index
@header = "Are you sure this is correct?"
end end
end end

3
app/models/form/sales/questions/not_retired_value_check.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::NotRetiredValueCheck < ::Form::Question
def initialize(id, hsh, page, person_index:) def initialize(id, hsh, page, person_index:)
super(id, hsh, page) super(id, hsh, page)
@id = "retirement_value_check" @id = "retirement_value_check"
@check_answer_label = "Retirement confirmation" @copy_key = "sales.soft_validations.retirement_value_check.max"
@type = "interruption_screen" @type = "interruption_screen"
@answer_options = { @answer_options = {
"0" => { "value" => "Yes" }, "0" => { "value" => "Yes" },
@ -19,6 +19,5 @@ class Form::Sales::Questions::NotRetiredValueCheck < ::Form::Question
], ],
} }
@check_answers_card_number = person_index @check_answers_card_number = person_index
@header = "Are you sure this person isn't retired?"
end end
end end

3
app/models/form/sales/questions/old_persons_shared_ownership_value_check.rb

@ -2,8 +2,7 @@ class Form::Sales::Questions::OldPersonsSharedOwnershipValueCheck < ::Form::Ques
def initialize(id, hsh, page) def initialize(id, hsh, page)
super super
@id = "old_persons_shared_ownership_value_check" @id = "old_persons_shared_ownership_value_check"
@check_answer_label = "Shared ownership confirmation" @copy_key = "sales.soft_validations.old_persons_shared_ownership_value_check"
@header = "Are you sure this is correct?"
@type = "interruption_screen" @type = "interruption_screen"
@answer_options = { @answer_options = {
"0" => { "value" => "Yes" }, "0" => { "value" => "Yes" },

3
app/models/form/sales/questions/partner_under_16_value_check.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::PartnerUnder16ValueCheck < ::Form::Question
def initialize(id, hsh, page, person_index:) def initialize(id, hsh, page, person_index:)
super(id, hsh, page) super(id, hsh, page)
@id = "partner_under_16_value_check" @id = "partner_under_16_value_check"
@check_answer_label = "Partner under 16 confirmation" @copy_key = "sales.soft_validations.partner_under_16_value_check"
@type = "interruption_screen" @type = "interruption_screen"
@answer_options = { @answer_options = {
"0" => { "value" => "Yes" }, "0" => { "value" => "Yes" },
@ -19,6 +19,5 @@ class Form::Sales::Questions::PartnerUnder16ValueCheck < ::Form::Question
], ],
} }
@check_answers_card_number = person_index @check_answers_card_number = person_index
@header = "Are you sure this is correct?"
end end
end end

3
app/models/form/sales/questions/person_student_not_child_value_check.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::PersonStudentNotChildValueCheck < ::Form::Question
def initialize(id, hsh, page, person_index:) def initialize(id, hsh, page, person_index:)
super(id, hsh, page) super(id, hsh, page)
@id = "student_not_child_value_check" @id = "student_not_child_value_check"
@check_answer_label = "Student not a child confirmation" @copy_key = "sales.soft_validations.student_not_child_value_check"
@type = "interruption_screen" @type = "interruption_screen"
@answer_options = { @answer_options = {
"0" => { "value" => "Yes" }, "0" => { "value" => "Yes" },
@ -19,6 +19,5 @@ class Form::Sales::Questions::PersonStudentNotChildValueCheck < ::Form::Question
], ],
} }
@check_answers_card_number = person_index @check_answers_card_number = person_index
@header = "Are you sure this person is not a child?"
end end
end end

3
app/models/form/sales/questions/retirement_value_check.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::RetirementValueCheck < ::Form::Question
def initialize(id, hsh, page, person_index:) def initialize(id, hsh, page, person_index:)
super(id, hsh, page) super(id, hsh, page)
@id = "retirement_value_check" @id = "retirement_value_check"
@check_answer_label = "Retirement confirmation" @copy_key = "sales.soft_validations.retirement_value_check.min"
@type = "interruption_screen" @type = "interruption_screen"
@answer_options = { @answer_options = {
"0" => { "value" => "Yes" }, "0" => { "value" => "Yes" },
@ -19,6 +19,5 @@ class Form::Sales::Questions::RetirementValueCheck < ::Form::Question
], ],
} }
@check_answers_card_number = person_index @check_answers_card_number = person_index
@header = "Are you sure this person is retired?"
end end
end end

17
config/locales/en.yml

@ -724,30 +724,17 @@ Make sure these answers are correct."
hint_text: "This is higher than we would expect." hint_text: "This is higher than we would expect."
shared_ownership_deposit: shared_ownership_deposit:
title_text: "You told us that the %{mortgage_deposit_and_discount_error_fields} add up to %{mortgage_deposit_and_discount_total}." title_text: "You told us that the %{mortgage_deposit_and_discount_error_fields} add up to %{mortgage_deposit_and_discount_total}."
old_persons_shared_ownership:
title_text:
one: "You told us the buyer is using the Older Persons Shared Ownership scheme."
two: "You told us the buyers are using the Older Persons Shared Ownership scheme."
hint_text: "At least one buyer must be aged 65 years and over to use this scheme."
staircase_bought_seems_high: staircase_bought_seems_high:
title_text: "You told us that %{percentage}% was bought in this staircasing transaction." title_text: "You told us that %{percentage}% was bought in this staircasing transaction."
hint_text: "Most staircasing transactions are less than 50%" hint_text: "Most staircasing transactions are less than 50%"
monthly_charges_over_soft_max: monthly_charges_over_soft_max:
title_text: "You told us that the monthly charges were %{mscharge}." title_text: "You told us that the monthly charges were %{mscharge}."
hint_text: "This is higher than we would expect." hint_text: "This is higher than we would expect."
student_not_child:
title_text: "You told us this person is a student aged between 16 and 19."
discounted_sale_value: discounted_sale_value:
title_text: "Mortgage, deposit, and grant total must equal %{value_with_discount}." title_text: "Mortgage, deposit, and grant total must equal %{value_with_discount}."
informative_text: "Your given mortgage, deposit and grant total is %{mortgage_deposit_and_grant_total}." informative_text: "Your given mortgage, deposit and grant total is %{mortgage_deposit_and_grant_total}."
care_home_charges: care_home_charges:
title_text: "Care home charges should be provided if this is a care home accommodation." title_text: "Care home charges should be provided if this is a care home accommodation."
buyer1_livein_wrong_for_ownership_type:
title_text: "You told us that buyer 1 will not live in the property."
hint_text: " For %{ownership_scheme} types, the buyer usually lives in the property."
buyer2_livein_wrong_for_ownership_type:
title_text: "You told us that buyer 2 will not live in the property."
hint_text: " For %{ownership_scheme} types, the buyer usually lives in the property."
percentage_discount_value: percentage_discount_value:
title_text: "You told us that the percentage discount is %{discount}." title_text: "You told us that the percentage discount is %{discount}."
hint_text: "This is higher than we would expect." hint_text: "This is higher than we would expect."
@ -783,12 +770,8 @@ Make sure these answers are correct."
informative_text: "We could not find an address that matches your search. You can search again or continue to enter the address manually." informative_text: "We could not find an address that matches your search. You can search again or continue to enter the address manually."
partner_under_16_lettings: partner_under_16_lettings:
title: "You told us this person is aged %{age} years and has 'Partner' relationship to the lead tenant." title: "You told us this person is aged %{age} years and has 'Partner' relationship to the lead tenant."
partner_under_16_sales:
title: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1."
multiple_partners_lettings: multiple_partners_lettings:
title: "You told us there are more than 1 persons with 'Partner' relationship to the lead tenant." title: "You told us there are more than 1 persons with 'Partner' relationship to the lead tenant."
multiple_partners_sales:
title: "You told us there are more than 1 persons with 'Partner' relationship to buyer 1."
devise: devise:
two_factor_authentication: two_factor_authentication:

63
config/locales/forms/2023/sales/soft_validations.en.yml

@ -3,25 +3,51 @@ en:
2023: 2023:
sales: sales:
soft_validations: soft_validations:
income1_value_check: retirement_value_check:
max:
page_header: ""
check_answer_label: "Retirement confirmation"
hint_text: ""
question_text: "Are you sure this person isn't retired?"
title_text: "You told us this person is over 66 and not retired."
informative_text: "The minimum expected retirement age in England is 66."
min:
page_header: ""
check_answer_label: "Retirement confirmation"
hint_text: ""
question_text: "Are you sure this person is retired?"
title_text: "You told us this person is aged %{age} years and retired."
informative_text: "The minimum expected retirement age in England is 66."
old_persons_shared_ownership_value_check:
page_header: "" page_header: ""
check_answer_label: "Shared ownership confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text:
joint_purchase: "You told us the buyers are using the Older Persons Shared Ownership scheme."
not_joint_purchase: "You told us the buyer is using the Older Persons Shared Ownership scheme."
informative_text: "At least one buyer must be aged 65 years and over to use this scheme."
income1_value_check:
check_answer_label: "Buyer 1 income confirmation" check_answer_label: "Buyer 1 income confirmation"
hint_text: "" hint_text: ""
question_text: "Are you sure this is correct?" question_text: "Are you sure this is correct?"
min: min:
page_header: ""
title_text: "You told us income was %{income}." title_text: "You told us income was %{income}."
informative_text: "This is less than we would expect for someone in this working situation." informative_text: "This is less than we would expect for someone in this working situation."
max: max:
page_header: ""
title_text: "You told us the income of buyer 1 is %{income}. This seems high. Are you sure this is correct?" title_text: "You told us the income of buyer 1 is %{income}. This seems high. Are you sure this is correct?"
income2_value_check: income2_value_check:
page_header: ""
check_answer_label: "Buyer 2 income confirmation" check_answer_label: "Buyer 2 income confirmation"
hint_text: "" hint_text: ""
question_text: "Are you sure this is correct?" question_text: "Are you sure this is correct?"
min: min:
page_header: ""
title_text: "You told us income was %{income}." title_text: "You told us income was %{income}."
informative_text: "This is less than we would expect for someone in this working situation." informative_text: "This is less than we would expect for someone in this working situation."
max: max:
page_header: ""
title_text: "You told us the income of buyer 2 is %{income}. This seems high. Are you sure this is correct?" title_text: "You told us the income of buyer 2 is %{income}. This seems high. Are you sure this is correct?"
combined_income_value_check: combined_income_value_check:
page_header: "" page_header: ""
@ -64,3 +90,36 @@ en:
hint_text: "" hint_text: ""
question_text: "You told us that someone in the household uses a wheelchair." question_text: "You told us that someone in the household uses a wheelchair."
title_text: "You told us that someone in the household uses a wheelchair." title_text: "You told us that someone in the household uses a wheelchair."
buyer_livein_value_check:
buyer1:
page_header: ""
check_answer_label: "Buyer live in confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us that buyer 1 will not live in the property."
informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
buyer2:
page_header: ""
check_answer_label: "Buyer live in confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us that buyer 2 will not live in the property."
informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
student_not_child_value_check:
page_header: ""
check_answer_label: "Student not a child confirmation"
hint_text: ""
question_text: "Are you sure this person is not a child?"
title_text: "You told us this person is a student aged between 16 and 19."
partner_under_16_value_check:
page_header: ""
check_answer_label: "Partner under 16 confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1."
multiple_partners_value_check:
page_header: ""
check_answer_label: "Multiple partners confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us there are more than 1 persons with 'Partner' relationship to buyer 1."

63
config/locales/forms/2024/sales/soft_validations.en.yml

@ -3,25 +3,51 @@ en:
2024: 2024:
sales: sales:
soft_validations: soft_validations:
income1_value_check: retirement_value_check:
max:
page_header: ""
check_answer_label: "Retirement confirmation"
hint_text: ""
question_text: "Are you sure this person isn't retired?"
title_text: "You told us this person is over 66 and not retired."
informative_text: "The minimum expected retirement age in England is 66."
min:
page_header: ""
check_answer_label: "Retirement confirmation"
hint_text: ""
question_text: "Are you sure this person is retired?"
title_text: "You told us this person is aged %{age} years and retired."
informative_text: "The minimum expected retirement age in England is 66."
old_persons_shared_ownership_value_check:
page_header: "" page_header: ""
check_answer_label: "Shared ownership confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text:
joint_purchase: "You told us the buyers are using the Older Persons Shared Ownership scheme."
not_joint_purchase: "You told us the buyer is using the Older Persons Shared Ownership scheme."
informative_text: "At least one buyer must be aged 65 years and over to use this scheme."
income1_value_check:
check_answer_label: "Buyer 1 income confirmation" check_answer_label: "Buyer 1 income confirmation"
hint_text: "" hint_text: ""
question_text: "Are you sure this is correct?" question_text: "Are you sure this is correct?"
min: min:
page_header: ""
title_text: "You told us income was %{income}." title_text: "You told us income was %{income}."
informative_text: "This is less than we would expect for someone in this working situation." informative_text: "This is less than we would expect for someone in this working situation."
max: max:
page_header: ""
title_text: "You told us the income of buyer 1 is %{income}. This seems high. Are you sure this is correct?" title_text: "You told us the income of buyer 1 is %{income}. This seems high. Are you sure this is correct?"
income2_value_check: income2_value_check:
page_header: ""
check_answer_label: "Buyer 2 income confirmation" check_answer_label: "Buyer 2 income confirmation"
hint_text: "" hint_text: ""
question_text: "Are you sure this is correct?" question_text: "Are you sure this is correct?"
min: min:
page_header: ""
title_text: "You told us income was %{income}." title_text: "You told us income was %{income}."
informative_text: "This is less than we would expect for someone in this working situation." informative_text: "This is less than we would expect for someone in this working situation."
max: max:
page_header: ""
title_text: "You told us the income of buyer 2 is %{income}. This seems high. Are you sure this is correct?" title_text: "You told us the income of buyer 2 is %{income}. This seems high. Are you sure this is correct?"
combined_income_value_check: combined_income_value_check:
page_header: "" page_header: ""
@ -64,3 +90,36 @@ en:
hint_text: "" hint_text: ""
question_text: "You told us that someone in the household uses a wheelchair." question_text: "You told us that someone in the household uses a wheelchair."
title_text: "You told us that someone in the household uses a wheelchair." title_text: "You told us that someone in the household uses a wheelchair."
buyer_livein_value_check:
buyer1:
page_header: ""
check_answer_label: "Buyer live in confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us that buyer 1 will not live in the property."
informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
buyer2:
page_header: ""
check_answer_label: "Buyer live in confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us that buyer 2 will not live in the property."
informative_text: "For %{ownership_scheme} types, the buyer usually lives in the property."
student_not_child_value_check:
page_header: ""
check_answer_label: "Student not a child confirmation"
hint_text: ""
question_text: "Are you sure this person is not a child?"
title_text: "You told us this person is a student aged between 16 and 19."
partner_under_16_value_check:
page_header: ""
check_answer_label: "Partner under 16 confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1."
multiple_partners_value_check:
page_header: ""
check_answer_label: "Multiple partners confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us there are more than 1 persons with 'Partner' relationship to buyer 1."

7
spec/models/form/sales/pages/buyer_live_in_value_check_spec.rb

@ -6,7 +6,8 @@ RSpec.describe Form::Sales::Pages::BuyerLiveInValueCheck, type: :model do
let(:page_id) { "buyer_1_live_in_value_check" } let(:page_id) { "buyer_1_live_in_value_check" }
let(:page_definition) { nil } let(:page_definition) { nil }
let(:person_index) { 1 } let(:person_index) { 1 }
let(:subsection) { instance_double(Form::Subsection) } let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
let(:subsection) { instance_double(Form::Subsection, form:) }
it "has correct subsection" do it "has correct subsection" do
expect(page.subsection).to eq(subsection) expect(page.subsection).to eq(subsection)
@ -34,7 +35,7 @@ RSpec.describe Form::Sales::Pages::BuyerLiveInValueCheck, type: :model do
it "has the correct title_text" do it "has the correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.buyer1_livein_wrong_for_ownership_type.title_text", "translation" => "forms.2024.sales.soft_validations.buyer_livein_value_check.buyer1.title_text",
"arguments" => [{ "key" => "ownership_scheme", "label" => false, "i18n_template" => "ownership_scheme" }], "arguments" => [{ "key" => "ownership_scheme", "label" => false, "i18n_template" => "ownership_scheme" }],
}) })
end end
@ -56,7 +57,7 @@ RSpec.describe Form::Sales::Pages::BuyerLiveInValueCheck, type: :model do
it "has the correct title_text" do it "has the correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.buyer2_livein_wrong_for_ownership_type.title_text", "translation" => "forms.2024.sales.soft_validations.buyer_livein_value_check.buyer2.title_text",
"arguments" => [{ "key" => "ownership_scheme", "label" => false, "i18n_template" => "ownership_scheme" }], "arguments" => [{ "key" => "ownership_scheme", "label" => false, "i18n_template" => "ownership_scheme" }],
}) })
end end

7
spec/models/form/sales/pages/multiple_partners_value_check_spec.rb

@ -4,7 +4,8 @@ RSpec.describe Form::Sales::Pages::MultiplePartnersValueCheck, type: :model do
subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) } subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) }
let(:page_definition) { nil } let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection) } let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
let(:subsection) { instance_double(Form::Subsection, form:) }
let(:person_index) { 1 } let(:person_index) { 1 }
let(:page_id) { "multiple_partners_value_check" } let(:page_id) { "multiple_partners_value_check" }
@ -39,7 +40,7 @@ RSpec.describe Form::Sales::Pages::MultiplePartnersValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.multiple_partners_sales.title", "translation" => "forms.2024.sales.soft_validations.multiple_partners_value_check.title_text",
"arguments" => [], "arguments" => [],
}) })
end end
@ -71,7 +72,7 @@ RSpec.describe Form::Sales::Pages::MultiplePartnersValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.multiple_partners_sales.title", "translation" => "forms.2024.sales.soft_validations.multiple_partners_value_check.title_text",
"arguments" => [], "arguments" => [],
}) })
end end

9
spec/models/form/sales/pages/old_persons_shared_ownership_value_check_spec.rb

@ -5,7 +5,8 @@ RSpec.describe Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck, type: :m
let(:page_id) { "old_persons_shared_ownership_value_check" } let(:page_id) { "old_persons_shared_ownership_value_check" }
let(:page_definition) { nil } let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection) } let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
let(:subsection) { instance_double(Form::Subsection, form:) }
it "has correct subsection" do it "has correct subsection" do
expect(page.subsection).to eq(subsection) expect(page.subsection).to eq(subsection)
@ -34,13 +35,13 @@ RSpec.describe Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck, type: :m
it "has the correct title_text" do it "has the correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.old_persons_shared_ownership.title_text.one", "translation" => "forms.2024.sales.soft_validations.old_persons_shared_ownership_value_check.title_text.not_joint_purchase",
"arguments" => [], "arguments" => [],
}) })
end end
it "has the correct informative_text" do it "has the correct informative_text" do
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "soft_validations.old_persons_shared_ownership.hint_text" }) expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.old_persons_shared_ownership_value_check.informative_text" })
end end
it "has the correct interruption_screen_question_ids" do it "has the correct interruption_screen_question_ids" do
@ -52,7 +53,7 @@ RSpec.describe Form::Sales::Pages::OldPersonsSharedOwnershipValueCheck, type: :m
it "has the correct title_text" do it "has the correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.old_persons_shared_ownership.title_text.two", "translation" => "forms.2024.sales.soft_validations.old_persons_shared_ownership_value_check.title_text.joint_purchase",
"arguments" => [], "arguments" => [],
}) })
end end

15
spec/models/form/sales/pages/partner_under16_value_check_spec.rb

@ -4,7 +4,8 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) } subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) }
let(:page_definition) { nil } let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection) } let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
let(:subsection) { instance_double(Form::Subsection, form:) }
let(:person_index) { 1 } let(:person_index) { 1 }
let(:page_id) { "partner_under_16_value_check" } let(:page_id) { "partner_under_16_value_check" }
@ -39,7 +40,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.partner_under_16_sales.title", "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age1", "key" => "age1",
@ -77,7 +78,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.partner_under_16_sales.title", "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age2", "key" => "age2",
@ -115,7 +116,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.partner_under_16_sales.title", "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age3", "key" => "age3",
@ -153,7 +154,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.partner_under_16_sales.title", "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age4", "key" => "age4",
@ -191,7 +192,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.partner_under_16_sales.title", "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age5", "key" => "age5",
@ -229,7 +230,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.partner_under_16_sales.title", "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age6", "key" => "age6",

5
spec/models/form/sales/pages/person_student_not_child_value_check_spec.rb

@ -4,7 +4,8 @@ RSpec.describe Form::Sales::Pages::PersonStudentNotChildValueCheck, type: :model
subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) } subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) }
let(:page_definition) { nil } let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection) } let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
let(:subsection) { instance_double(Form::Subsection, form:) }
let(:person_index) { 2 } let(:person_index) { 2 }
let(:page_id) { "person_2_student_not_child_value_check" } let(:page_id) { "person_2_student_not_child_value_check" }
@ -23,7 +24,7 @@ RSpec.describe Form::Sales::Pages::PersonStudentNotChildValueCheck, type: :model
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.student_not_child.title_text", "translation" => "forms.2024.sales.soft_validations.student_not_child_value_check.title_text",
}) })
end end

15
spec/models/form/sales/pages/retirement_value_check_spec.rb

@ -4,7 +4,8 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) } subject(:page) { described_class.new(page_id, page_definition, subsection, person_index:) }
let(:page_definition) { nil } let(:page_definition) { nil }
let(:subsection) { instance_double(Form::Subsection) } let(:form) { instance_double(Form, start_date: Time.zone.local(2024, 4, 1)) }
let(:subsection) { instance_double(Form::Subsection, form:) }
let(:person_index) { 1 } let(:person_index) { 1 }
let(:page_id) { "person_1_retirement_value_check" } let(:page_id) { "person_1_retirement_value_check" }
@ -39,7 +40,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.retirement.min.title", "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age1", "key" => "age1",
@ -77,7 +78,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.retirement.min.title", "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age2", "key" => "age2",
@ -115,7 +116,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.retirement.min.title", "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age3", "key" => "age3",
@ -153,7 +154,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.retirement.min.title", "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age4", "key" => "age4",
@ -191,7 +192,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.retirement.min.title", "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age5", "key" => "age5",
@ -229,7 +230,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
it "has correct title_text" do it "has correct title_text" do
expect(page.title_text).to eq({ expect(page.title_text).to eq({
"translation" => "soft_validations.retirement.min.title", "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.title_text",
"arguments" => [ "arguments" => [
{ {
"key" => "age6", "key" => "age6",

Loading…
Cancel
Save