diff --git a/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml b/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml index d81f44fbb..12ee21d8b 100644 --- a/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml +++ b/config/locales/forms/2025/sales/income_benefits_and_savings.en.yml @@ -8,12 +8,12 @@ en: income1nk: check_answer_label: "Buyer 1’s gross annual income known" check_answer_prompt: "Enter buyer 1’s gross annual income if known" - hint_text: "" + 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." question_text: "Do you know buyer 1’s annual income?" income1: check_answer_label: "Buyer 1’s gross annual income" check_answer_prompt: "" - 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." + hint_text: "" question_text: "Buyer 1’s gross annual income" inc1mort: @@ -28,12 +28,12 @@ en: income2nk: check_answer_label: "Buyer 2’s gross annual income known" check_answer_prompt: "Enter buyer 2’s gross annual income if known" - hint_text: "" + 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." question_text: "Do you know buyer 2’s annual income?" income2: check_answer_label: "Buyer 2’s gross annual income" check_answer_prompt: "" - 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." + hint_text: "" question_text: "Buyer 2’s gross annual income" inc2mort: diff --git a/config/locales/forms/2026/sales/income_benefits_and_savings.en.yml b/config/locales/forms/2026/sales/income_benefits_and_savings.en.yml index c2dc10435..5642ee9b1 100644 --- a/config/locales/forms/2026/sales/income_benefits_and_savings.en.yml +++ b/config/locales/forms/2026/sales/income_benefits_and_savings.en.yml @@ -8,12 +8,12 @@ en: income1nk: check_answer_label: "Buyer 1’s gross annual income known" check_answer_prompt: "Enter buyer 1’s gross annual income if known" - hint_text: "" + 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." question_text: "Do you know buyer 1’s annual income?" income1: check_answer_label: "Buyer 1’s gross annual income" check_answer_prompt: "" - 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." + hint_text: "" question_text: "Buyer 1’s gross annual income" inc1mort: @@ -28,12 +28,12 @@ en: income2nk: check_answer_label: "Buyer 2’s gross annual income known" check_answer_prompt: "Enter buyer 2’s gross annual income if known" - hint_text: "" + 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." question_text: "Do you know buyer 2’s annual income?" income2: check_answer_label: "Buyer 2’s gross annual income" check_answer_prompt: "" - 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." + hint_text: "" question_text: "Buyer 2’s gross annual income" inc2mort: diff --git a/spec/models/form/sales/questions/buyer1_income_known_spec.rb b/spec/models/form/sales/questions/buyer1_income_known_spec.rb index 4f1c8b445..d1b87bb3f 100644 --- a/spec/models/form/sales/questions/buyer1_income_known_spec.rb +++ b/spec/models/form/sales/questions/buyer1_income_known_spec.rb @@ -1,11 +1,19 @@ require "rails_helper" RSpec.describe Form::Sales::Questions::Buyer1IncomeKnown, type: :model do + include CollectionTimeHelper subject(:question) { described_class.new(question_id, question_definition, page) } let(:question_id) { nil } let(:question_definition) { nil } - let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) } + let(:page) { instance_double(Form::Page) } + let(:subsection) { instance_double(Form::Subsection) } + let(:form) { instance_double(Form, start_date: current_collection_start_date) } + + before do + allow(page).to receive(:subsection).and_return(subsection) + allow(subsection).to receive(:form).and_return(form) + end it "has correct page" do expect(question.page).to eq(page) @@ -39,4 +47,8 @@ RSpec.describe Form::Sales::Questions::Buyer1IncomeKnown, type: :model do it "has the correct check_answers_card_number" do expect(question.check_answers_card_number).to eq(1) end + + it "has the correct hint_text" do + 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 end diff --git a/spec/models/form/sales/questions/buyer1_income_spec.rb b/spec/models/form/sales/questions/buyer1_income_spec.rb index 4c9a10295..55d75a8f5 100644 --- a/spec/models/form/sales/questions/buyer1_income_spec.rb +++ b/spec/models/form/sales/questions/buyer1_income_spec.rb @@ -1,11 +1,19 @@ require "rails_helper" RSpec.describe Form::Sales::Questions::Buyer1Income, type: :model do + include CollectionTimeHelper subject(:question) { described_class.new(question_id, question_definition, page) } let(:question_id) { nil } let(:question_definition) { nil } - let(:page) { instance_double(Form::Page, subsection: instance_double(Form::Subsection, form: instance_double(Form, start_date: Time.zone.local(2023, 4, 1)))) } + let(:page) { instance_double(Form::Page) } + let(:subsection) { instance_double(Form::Subsection) } + let(:form) { instance_double(Form, start_date: current_collection_start_date) } + + before do + allow(page).to receive(:subsection).and_return(subsection) + allow(subsection).to receive(:form).and_return(form) + end it "has correct page" do expect(question.page).to eq(page) @@ -46,4 +54,8 @@ RSpec.describe Form::Sales::Questions::Buyer1Income, type: :model do it "has correct max" do expect(question.max).to eq(999_999) end + + it "has the correct hint_text" do + expect(question.hint_text).to eq("") + end end