From 10de48540857822940cf74fed95351e692fd252a Mon Sep 17 00:00:00 2001 From: kosiakkatrina <54268893+kosiakkatrina@users.noreply.github.com> Date: Thu, 14 Nov 2024 08:16:31 +0000 Subject: [PATCH] CLDC-3698 Rename household needs to other household information for sales (#2772) * Rename household needs occurences * Rename files --- app/models/form/sales/sections/household.rb | 2 +- .../{household_needs.rb => other_household_information.rb} | 4 ++-- ...sehold_needs.en.yml => other_household_information.en.yml} | 2 +- ...sehold_needs.en.yml => other_household_information.en.yml} | 2 +- ...sehold_needs.en.yml => other_household_information.en.yml} | 2 +- spec/features/form/check_answers_page_sales_logs_spec.rb | 2 +- spec/models/form/sales/sections/household_spec.rb | 2 +- ...hold_needs_spec.rb => other_household_information_spec.rb} | 4 ++-- 8 files changed, 10 insertions(+), 10 deletions(-) rename app/models/form/sales/subsections/{household_needs.rb => other_household_information.rb} (85%) rename config/locales/forms/2023/sales/{household_needs.en.yml => other_household_information.en.yml} (97%) rename config/locales/forms/2024/sales/{household_needs.en.yml => other_household_information.en.yml} (97%) rename config/locales/forms/2025/sales/{household_needs.en.yml => other_household_information.en.yml} (97%) rename spec/models/form/sales/subsections/{household_needs_spec.rb => other_household_information_spec.rb} (86%) diff --git a/app/models/form/sales/sections/household.rb b/app/models/form/sales/sections/household.rb index e8bcc1451..674f38197 100644 --- a/app/models/form/sales/sections/household.rb +++ b/app/models/form/sales/sections/household.rb @@ -7,7 +7,7 @@ class Form::Sales::Sections::Household < ::Form::Section @subsections = [ Form::Sales::Subsections::HouseholdCharacteristics.new(nil, nil, self), Form::Sales::Subsections::HouseholdSituation.new(nil, nil, self), - Form::Sales::Subsections::HouseholdNeeds.new(nil, nil, self), + Form::Sales::Subsections::OtherHouseholdInformation.new(nil, nil, self), ] end end diff --git a/app/models/form/sales/subsections/household_needs.rb b/app/models/form/sales/subsections/other_household_information.rb similarity index 85% rename from app/models/form/sales/subsections/household_needs.rb rename to app/models/form/sales/subsections/other_household_information.rb index a419cff95..3acc9ffd5 100644 --- a/app/models/form/sales/subsections/household_needs.rb +++ b/app/models/form/sales/subsections/other_household_information.rb @@ -1,7 +1,7 @@ -class Form::Sales::Subsections::HouseholdNeeds < ::Form::Subsection +class Form::Sales::Subsections::OtherHouseholdInformation < ::Form::Subsection def initialize(id, hsh, section) super - @id = "household_needs" + @id = "other_household_information" @label = "Other household information" @depends_on = [{ "setup_completed?" => true }] end diff --git a/config/locales/forms/2023/sales/household_needs.en.yml b/config/locales/forms/2023/sales/other_household_information.en.yml similarity index 97% rename from config/locales/forms/2023/sales/household_needs.en.yml rename to config/locales/forms/2023/sales/other_household_information.en.yml index f4a13e47a..6d96ca46e 100644 --- a/config/locales/forms/2023/sales/household_needs.en.yml +++ b/config/locales/forms/2023/sales/other_household_information.en.yml @@ -2,7 +2,7 @@ en: forms: 2023: sales: - household_needs: + other_household_information: hhregres: page_header: "" check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?" diff --git a/config/locales/forms/2024/sales/household_needs.en.yml b/config/locales/forms/2024/sales/other_household_information.en.yml similarity index 97% rename from config/locales/forms/2024/sales/household_needs.en.yml rename to config/locales/forms/2024/sales/other_household_information.en.yml index 290543a34..8363c5108 100644 --- a/config/locales/forms/2024/sales/household_needs.en.yml +++ b/config/locales/forms/2024/sales/other_household_information.en.yml @@ -2,7 +2,7 @@ en: forms: 2024: sales: - household_needs: + other_household_information: hhregres: page_header: "" check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?" diff --git a/config/locales/forms/2025/sales/household_needs.en.yml b/config/locales/forms/2025/sales/other_household_information.en.yml similarity index 97% rename from config/locales/forms/2025/sales/household_needs.en.yml rename to config/locales/forms/2025/sales/other_household_information.en.yml index 1908ba6ca..ddae70ffa 100644 --- a/config/locales/forms/2025/sales/household_needs.en.yml +++ b/config/locales/forms/2025/sales/other_household_information.en.yml @@ -2,7 +2,7 @@ en: forms: 2025: sales: - household_needs: + other_household_information: hhregres: page_header: "" check_answer_label: "Have any of the buyers ever served as a regular in the UK armed forces?" diff --git a/spec/features/form/check_answers_page_sales_logs_spec.rb b/spec/features/form/check_answers_page_sales_logs_spec.rb index 85d3d39b5..26ece07d3 100644 --- a/spec/features/form/check_answers_page_sales_logs_spec.rb +++ b/spec/features/form/check_answers_page_sales_logs_spec.rb @@ -35,7 +35,7 @@ RSpec.describe "Sales Log Check Answers Page" do let(:last_question_for_subsection) { "propcode" } it "does not group questions into summary cards if the questions in the subsection don't have a check_answers_card_number attribute" do - visit("/sales-logs/#{completed_sales_log_joint_purchase.id}/household-needs/check-answers") + visit("/sales-logs/#{completed_sales_log_joint_purchase.id}/other-household-information/check-answers") assert_selector ".govuk-summary-card__title", count: 0 end diff --git a/spec/models/form/sales/sections/household_spec.rb b/spec/models/form/sales/sections/household_spec.rb index cff166510..d747d171d 100644 --- a/spec/models/form/sales/sections/household_spec.rb +++ b/spec/models/form/sales/sections/household_spec.rb @@ -16,7 +16,7 @@ RSpec.describe Form::Sales::Sections::Household, type: :model do %w[ household_characteristics household_situation - household_needs + other_household_information ], ) end diff --git a/spec/models/form/sales/subsections/household_needs_spec.rb b/spec/models/form/sales/subsections/other_household_information_spec.rb similarity index 86% rename from spec/models/form/sales/subsections/household_needs_spec.rb rename to spec/models/form/sales/subsections/other_household_information_spec.rb index cd4ff67fa..461ad2cc9 100644 --- a/spec/models/form/sales/subsections/household_needs_spec.rb +++ b/spec/models/form/sales/subsections/other_household_information_spec.rb @@ -1,6 +1,6 @@ require "rails_helper" -RSpec.describe Form::Sales::Subsections::HouseholdNeeds, type: :model do +RSpec.describe Form::Sales::Subsections::OtherHouseholdInformation, type: :model do subject(:household_characteristics) { described_class.new(subsection_id, subsection_definition, section) } let(:subsection_id) { nil } @@ -27,7 +27,7 @@ RSpec.describe Form::Sales::Subsections::HouseholdNeeds, type: :model do end it "has the correct id" do - expect(household_characteristics.id).to eq("household_needs") + expect(household_characteristics.id).to eq("other_household_information") end it "has the correct label" do