Browse Source

Add income hint text

pull/1236/head
Kat 4 years ago
parent
commit
d2acadfcab
  1. 1
      app/models/form/sales/questions/buyer1_income.rb
  2. 1
      app/models/form/sales/questions/buyer2_income.rb
  3. 2
      spec/models/form/sales/questions/buyer1_income_spec.rb
  4. 2
      spec/models/form/sales/questions/buyer2_income_spec.rb

1
app/models/form/sales/questions/buyer1_income.rb

@ -4,6 +4,7 @@ class Form::Sales::Questions::Buyer1Income < ::Form::Question
@id = "income1"
@check_answer_label = "Buyer 1’s gross annual income"
@header = "Buyer 1’s gross annual income"
@hint_text = "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments."
@type = "numeric"
@min = 0
@max = 999_999

1
app/models/form/sales/questions/buyer2_income.rb

@ -5,6 +5,7 @@ class Form::Sales::Questions::Buyer2Income < ::Form::Question
@check_answer_label = "Buyer 2’s gross annual income"
@header = "Buyer 2’s gross annual income"
@type = "numeric"
@hint_text = "Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments."
@min = 0
@step = 1
@width = 5

2
spec/models/form/sales/questions/buyer1_income_spec.rb

@ -32,7 +32,7 @@ RSpec.describe Form::Sales::Questions::Buyer1Income, type: :model do
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
expect(question.hint_text).to eq("Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments.")
end
it "has correct width" do

2
spec/models/form/sales/questions/buyer2_income_spec.rb

@ -32,7 +32,7 @@ RSpec.describe Form::Sales::Questions::Buyer2Income, type: :model do
end
it "has the correct hint" do
expect(question.hint_text).to be_nil
expect(question.hint_text).to eq("Provide the gross annual income (i.e. salary before tax) plus the annual amount of benefits, Universal Credit or pensions, and income from investments.")
end
it "has correct width" do

Loading…
Cancel
Save