Browse Source

CLDC-3698 Rename household needs to other household information for sales (#2772)

* Rename household needs occurences

* Rename files
pull/2778/head
kosiakkatrina 2 months ago committed by GitHub
parent
commit
10de485408
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      app/models/form/sales/sections/household.rb
  2. 4
      app/models/form/sales/subsections/other_household_information.rb
  3. 2
      config/locales/forms/2023/sales/other_household_information.en.yml
  4. 2
      config/locales/forms/2024/sales/other_household_information.en.yml
  5. 2
      config/locales/forms/2025/sales/other_household_information.en.yml
  6. 2
      spec/features/form/check_answers_page_sales_logs_spec.rb
  7. 2
      spec/models/form/sales/sections/household_spec.rb
  8. 4
      spec/models/form/sales/subsections/other_household_information_spec.rb

2
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

4
app/models/form/sales/subsections/household_needs.rb → 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

2
config/locales/forms/2023/sales/household_needs.en.yml → 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?"

2
config/locales/forms/2024/sales/household_needs.en.yml → 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?"

2
config/locales/forms/2025/sales/household_needs.en.yml → 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?"

2
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

2
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

4
spec/models/form/sales/subsections/household_needs_spec.rb → 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
Loading…
Cancel
Save