diff --git a/app/models/form/lettings/questions/waityear.rb b/app/models/form/lettings/questions/waityear.rb index 67a560167..5c81fdedc 100644 --- a/app/models/form/lettings/questions/waityear.rb +++ b/app/models/form/lettings/questions/waityear.rb @@ -8,8 +8,9 @@ class Form::Lettings::Questions::Waityear < ::Form::Question end def answer_options - if form.start_year_2024_or_later? - { + if form.start_year_2025_or_later? + return { + "13" => { "value" => "Household not on the housing register (or waiting list) in this area" }, "2" => { "value" => "Less than 1 year" }, "7" => { "value" => "1 year but under 2 years" }, "8" => { "value" => "2 years but under 3 years" }, @@ -20,18 +21,32 @@ class Form::Lettings::Questions::Waityear < ::Form::Question "divider" => { "value" => true }, "6" => { "value" => "Don’t know" }, }.freeze - else - { + end + + if form.start_year_2024_or_later? + return { "2" => { "value" => "Less than 1 year" }, "7" => { "value" => "1 year but under 2 years" }, "8" => { "value" => "2 years but under 3 years" }, "9" => { "value" => "3 years but under 4 years" }, "10" => { "value" => "4 years but under 5 years" }, - "5" => { "value" => "5 years or more" }, + "11" => { "value" => "5 years but under 10 years" }, + "12" => { "value" => "10 years or more" }, "divider" => { "value" => true }, "6" => { "value" => "Don’t know" }, }.freeze end + + { + "2" => { "value" => "Less than 1 year" }, + "7" => { "value" => "1 year but under 2 years" }, + "8" => { "value" => "2 years but under 3 years" }, + "9" => { "value" => "3 years but under 4 years" }, + "10" => { "value" => "4 years but under 5 years" }, + "5" => { "value" => "5 years or more" }, + "divider" => { "value" => true }, + "6" => { "value" => "Don’t know" }, + }.freeze end QUESTION_NUMBER_FROM_YEAR = { 2023 => 76, 2024 => 75 }.freeze diff --git a/config/locales/forms/2023/lettings/household_situation.en.yml b/config/locales/forms/2023/lettings/household_situation.en.yml index 0144c98fa..1ce9f900a 100644 --- a/config/locales/forms/2023/lettings/household_situation.en.yml +++ b/config/locales/forms/2023/lettings/household_situation.en.yml @@ -26,10 +26,10 @@ en: hint_text: "You told us this letting is a renewal. We have removed some options because of this." question_text: "What is the tenant’s main reason for the household leaving their last settled home?" reasonother: - check_answer_label: "Length of time on local authority waiting list" + check_answer_label: "" check_answer_prompt: "" hint_text: "" - question_text: "How long has the household been on the local authority waiting list for the new letting?" + question_text: "What is the reason?" reason_for_leaving_last_settled_home: page_header: "" reason: diff --git a/config/locales/forms/2024/lettings/household_situation.en.yml b/config/locales/forms/2024/lettings/household_situation.en.yml index dcad41178..1caae7373 100644 --- a/config/locales/forms/2024/lettings/household_situation.en.yml +++ b/config/locales/forms/2024/lettings/household_situation.en.yml @@ -26,10 +26,10 @@ en: hint_text: "You told us this letting is a renewal. We have removed some options because of this." question_text: "What is the tenant’s main reason for the household leaving their last settled home?" reasonother: - check_answer_label: "Length of time on local authority waiting list" + check_answer_label: "" check_answer_prompt: "" hint_text: "" - question_text: "How long has the household been on the local authority waiting list for the area of the new letting?" + question_text: "What is the reason?" reason_for_leaving_last_settled_home: page_header: "" reason: diff --git a/config/locales/forms/2025/lettings/household_situation.en.yml b/config/locales/forms/2025/lettings/household_situation.en.yml index 17c90aaba..fbbdcf657 100644 --- a/config/locales/forms/2025/lettings/household_situation.en.yml +++ b/config/locales/forms/2025/lettings/household_situation.en.yml @@ -15,7 +15,7 @@ en: check_answer_label: "Length of time on local authority waiting list" check_answer_prompt: "" hint_text: "" - question_text: "How long has the household been on the local authority waiting list for the area of the new letting?" + question_text: "How long has the household been on the local authority housing register (or waiting list) for the area of the new letting?" reason: reason_for_leaving_last_settled_home_renewal: @@ -26,10 +26,10 @@ en: hint_text: "You told us this letting is a renewal. We have removed some options because of this." question_text: "What is the tenant’s main reason for the household leaving their last settled home?" reasonother: - check_answer_label: "Length of time on local authority waiting list" + check_answer_label: "" check_answer_prompt: "" hint_text: "" - question_text: "How long has the household been on the local authority waiting list for the area of the new letting?" + question_text: "What is the reason?" reason_for_leaving_last_settled_home: page_header: "" reason: diff --git a/spec/models/form/lettings/questions/waityear_spec.rb b/spec/models/form/lettings/questions/waityear_spec.rb index 5d9a5b3a9..1ed9fbaab 100644 --- a/spec/models/form/lettings/questions/waityear_spec.rb +++ b/spec/models/form/lettings/questions/waityear_spec.rb @@ -10,6 +10,7 @@ RSpec.describe Form::Lettings::Questions::Waityear, type: :model do before do allow(form).to receive(:start_year_2024_or_later?).and_return(false) + allow(form).to receive(:start_year_2025_or_later?).and_return(false) allow(page).to receive(:subsection).and_return(subsection) allow(subsection).to receive(:form).and_return(form) end @@ -76,4 +77,25 @@ RSpec.describe Form::Lettings::Questions::Waityear, type: :model do }) end end + + context "with 2025/26 form" do + before do + allow(form).to receive(:start_year_2025_or_later?).and_return(true) + end + + it "has the correct answer_options" do + expect(question.answer_options).to eq({ + "13" => { "value" => "Household not on the housing register (or waiting list) in this area" }, + "2" => { "value" => "Less than 1 year" }, + "7" => { "value" => "1 year but under 2 years" }, + "8" => { "value" => "2 years but under 3 years" }, + "9" => { "value" => "3 years but under 4 years" }, + "10" => { "value" => "4 years but under 5 years" }, + "11" => { "value" => "5 years but under 10 years" }, + "12" => { "value" => "10 years or more" }, + "divider" => { "value" => true }, + "6" => { "value" => "Don’t know" }, + }) + end + end end