Browse Source

Update validation message: monthly charge

pull/1584/head
Kat 3 years ago
parent
commit
5a48a0bb6e
  1. 11
      app/models/form/sales/pages/monthly_charges_value_check.rb
  2. 3
      config/locales/en.yml
  3. 4
      spec/models/form/sales/pages/monthly_charges_value_check_spec.rb

11
app/models/form/sales/pages/monthly_charges_value_check.rb

@ -8,9 +8,18 @@ class Form::Sales::Pages::MonthlyChargesValueCheck < ::Form::Page
]
@title_text = {
"translation" => "soft_validations.monthly_charges_over_soft_max.title_text",
"arguments" => [
{
"key" => "field_formatted_as_currency",
"arguments_for_key" => "mscharge",
"i18n_template" => "mscharge",
},
],
}
@informative_text = {
"translation" => "soft_validations.monthly_charges_over_soft_max.hint_text",
"arguments" => [],
}
@informative_text = {}
end
def questions

3
config/locales/en.yml

@ -562,7 +562,8 @@ en:
title_text: "You told us that %{percentage}% was bought in this staircasing transaction."
hint_text: "Most staircasing transactions are less than 50%"
monthly_charges_over_soft_max:
title_text: "The amount of monthly charges is high for this type of property and sale type"
title_text: "You told us that the monthly charges were %{mscharge}."
hint_text: "This is higher than we would expect."
student_not_child:
title_text: "You told us this person is a student aged beween 16 and 19"
discounted_sale_value:

4
spec/models/form/sales/pages/monthly_charges_value_check_spec.rb

@ -38,12 +38,12 @@ RSpec.describe Form::Sales::Pages::MonthlyChargesValueCheck, type: :model do
it "has correct title_text" do
expect(page.title_text).to eq({
"translation" => "soft_validations.monthly_charges_over_soft_max.title_text",
"arguments" => [],
"arguments" => [{ "arguments_for_key" => "mscharge", "i18n_template" => "mscharge", "key" => "field_formatted_as_currency" }],
})
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "soft_validations.monthly_charges_over_soft_max.hint_text" })
end
it "has correct interruption_screen_question_ids" do

Loading…
Cancel
Save