diff --git a/app/models/form/sales/subsections/household_characteristics.rb b/app/models/form/sales/subsections/household_characteristics.rb index e99d85f08..3815dfc61 100644 --- a/app/models/form/sales/subsections/household_characteristics.rb +++ b/app/models/form/sales/subsections/household_characteristics.rb @@ -11,11 +11,11 @@ class Form::Sales::Subsections::HouseholdCharacteristics < ::Form::Subsection Form::Sales::Pages::BuyerInterview.new(nil, nil, self), Form::Sales::Pages::PrivacyNotice.new(nil, nil, self), Form::Sales::Pages::Age1.new(nil, nil, self), - Form::Sales::Pages::RetirementValueCheck.new("person_1_age_retirement_value_check", nil, self, person_index: 1), - Form::Sales::Pages::RetirementValueCheck.new("person_1_age_retirement_value_check_joint_purchase", nil, self, person_index: 1), + Form::Sales::Pages::RetirementValueCheck.new("age_1_retirement_value_check", nil, self, person_index: 1), + Form::Sales::Pages::RetirementValueCheck.new("age_1_retirement_value_check_joint_purchase", nil, self, person_index: 1), Form::Sales::Pages::GenderIdentity1.new(nil, nil, self), - Form::Sales::Pages::RetirementValueCheck.new("person_1_gender_retirement_value_check", nil, self, person_index: 1), - Form::Sales::Pages::RetirementValueCheck.new("person_1_gender_retirement_value_check_joint_purchase", nil, self, person_index: 1), + Form::Sales::Pages::RetirementValueCheck.new("gender_1_retirement_value_check", nil, self, person_index: 1), + Form::Sales::Pages::RetirementValueCheck.new("gender_1_retirement_value_check_joint_purchase", nil, self, person_index: 1), Form::Sales::Pages::Buyer1EthnicGroup.new(nil, nil, self), Form::Sales::Pages::Buyer1EthnicBackgroundBlack.new(nil, nil, self), Form::Sales::Pages::Buyer1EthnicBackgroundAsian.new(nil, nil, self), @@ -24,20 +24,20 @@ class Form::Sales::Subsections::HouseholdCharacteristics < ::Form::Subsection Form::Sales::Pages::Buyer1EthnicBackgroundWhite.new(nil, nil, self), Form::Sales::Pages::Nationality1.new(nil, nil, self), Form::Sales::Pages::Buyer1WorkingSituation.new(nil, nil, self), - Form::Sales::Pages::RetirementValueCheck.new("person_1_working_situation_retirement_value_check", nil, self, person_index: 1), - Form::Sales::Pages::RetirementValueCheck.new("person_1_working_situation_retirement_value_check_joint_purchase", nil, self, person_index: 1), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_1_retirement_value_check", nil, self, person_index: 1), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_1_retirement_value_check_joint_purchase", nil, self, person_index: 1), Form::Sales::Pages::Buyer1IncomeValueCheck.new("working_situation_buyer_1_income_value_check", nil, self), Form::Sales::Pages::Buyer1LiveInProperty.new(nil, nil, self), Form::Sales::Pages::Buyer2RelationshipToBuyer1.new(nil, nil, self), Form::Sales::Pages::Age2.new(nil, nil, self), - Form::Sales::Pages::RetirementValueCheck.new("person_2_age_retirement_value_check", nil, self, person_index: 2), - Form::Sales::Pages::RetirementValueCheck.new("person_2_age_retirement_value_check_joint_purchase", nil, self, person_index: 2), + Form::Sales::Pages::RetirementValueCheck.new("age_2_retirement_value_check", nil, self, person_index: 2), + Form::Sales::Pages::RetirementValueCheck.new("age_2_retirement_value_check_joint_purchase", nil, self, person_index: 2), Form::Sales::Pages::GenderIdentity2.new(nil, nil, self), - Form::Sales::Pages::RetirementValueCheck.new("person_2_gender_retirement_value_check", nil, self, person_index: 2), - Form::Sales::Pages::RetirementValueCheck.new("person_2_gender_retirement_value_check_joint_purchase", nil, self, person_index: 2), + Form::Sales::Pages::RetirementValueCheck.new("gender_2_retirement_value_check", nil, self, person_index: 2), + Form::Sales::Pages::RetirementValueCheck.new("gender_2_retirement_value_check_joint_purchase", nil, self, person_index: 2), Form::Sales::Pages::Buyer2WorkingSituation.new(nil, nil, self), - Form::Sales::Pages::RetirementValueCheck.new("person_2_working_situation_retirement_value_check", nil, self, person_index: 2), - Form::Sales::Pages::RetirementValueCheck.new("person_2_working_situation_retirement_value_check_joint_purchase", nil, self, person_index: 2), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_2_retirement_value_check", nil, self, person_index: 2), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_2_retirement_value_check_joint_purchase", nil, self, person_index: 2), Form::Sales::Pages::Buyer2LiveInProperty.new(nil, nil, self), Form::Sales::Pages::NumberOfOthersInProperty.new(nil, nil, self), Form::Sales::Pages::PersonKnown.new("person_1_known", nil, self, person_index: 2), @@ -45,65 +45,65 @@ class Form::Sales::Subsections::HouseholdCharacteristics < ::Form::Subsection Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_1_relationship_to_buyer_1", nil, self, person_index: 2), Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_1_relationship_to_buyer_1_joint_purchase", nil, self, person_index: 3), Form::Sales::Pages::PersonAge.new("person_1_age", nil, self, person_index: 2), - Form::Sales::Pages::RetirementValueCheck.new("person_3_age_retirement_value_check", nil, self, person_index: 2), + Form::Sales::Pages::RetirementValueCheck.new("age_2_retirement_value_check", nil, self, person_index: 2), Form::Sales::Pages::PersonAge.new("person_1_age_joint_purchase", nil, self, person_index: 3), - Form::Sales::Pages::RetirementValueCheck.new("person_3_age_retirement_value_check_joint_purchase", nil, self, person_index: 3), + Form::Sales::Pages::RetirementValueCheck.new("age_3_retirement_value_check_joint_purchase", nil, self, person_index: 3), Form::Sales::Pages::PersonGenderIdentity.new("person_1_gender_identity", nil, self, person_index: 2), - Form::Sales::Pages::RetirementValueCheck.new("person_3_gender_retirement_value_check", nil, self, person_index: 2), + Form::Sales::Pages::RetirementValueCheck.new("gender_2_retirement_value_check", nil, self, person_index: 2), Form::Sales::Pages::PersonGenderIdentity.new("person_1_gender_identity_joint_purchase", nil, self, person_index: 3), - Form::Sales::Pages::RetirementValueCheck.new("person_3_gender_retirement_value_check_joint_purchase", nil, self, person_index: 3), + Form::Sales::Pages::RetirementValueCheck.new("gender_3_retirement_value_check_joint_purchase", nil, self, person_index: 3), Form::Sales::Pages::PersonWorkingSituation.new("person_1_working_situation", nil, self, person_index: 2), - Form::Sales::Pages::RetirementValueCheck.new("person_3_working_situation_retirement_value_check", nil, self, person_index: 2), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_2_retirement_value_check", nil, self, person_index: 2), Form::Sales::Pages::PersonWorkingSituation.new("person_1_working_situation_joint_purchase", nil, self, person_index: 3), - Form::Sales::Pages::RetirementValueCheck.new("person_3_working_situation_retirement_value_check_joint_purchase", nil, self, person_index: 3), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_3_retirement_value_check_joint_purchase", nil, self, person_index: 3), Form::Sales::Pages::PersonKnown.new("person_2_known", nil, self, person_index: 3), Form::Sales::Pages::PersonKnown.new("person_2_known_joint_purchase", nil, self, person_index: 4), Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_2_relationship_to_buyer_1", nil, self, person_index: 3), Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_2_relationship_to_buyer_1_joint_purchase", nil, self, person_index: 4), Form::Sales::Pages::PersonAge.new("person_2_age", nil, self, person_index: 3), - Form::Sales::Pages::RetirementValueCheck.new("person_4_age_retirement_value_check", nil, self, person_index: 3), + Form::Sales::Pages::RetirementValueCheck.new("age_3_retirement_value_check", nil, self, person_index: 3), Form::Sales::Pages::PersonAge.new("person_2_age_joint_purchase", nil, self, person_index: 4), - Form::Sales::Pages::RetirementValueCheck.new("person_4_age_retirement_value_check_joint_purchase", nil, self, person_index: 4), + Form::Sales::Pages::RetirementValueCheck.new("age_4_retirement_value_check_joint_purchase", nil, self, person_index: 4), Form::Sales::Pages::PersonGenderIdentity.new("person_2_gender_identity", nil, self, person_index: 3), - Form::Sales::Pages::RetirementValueCheck.new("person_4_gender_retirement_value_check", nil, self, person_index: 3), + Form::Sales::Pages::RetirementValueCheck.new("gender_3_retirement_value_check", nil, self, person_index: 3), Form::Sales::Pages::PersonGenderIdentity.new("person_2_gender_identity_joint_purchase", nil, self, person_index: 4), - Form::Sales::Pages::RetirementValueCheck.new("person_4_gender_retirement_value_check_joint_purchase", nil, self, person_index: 4), + Form::Sales::Pages::RetirementValueCheck.new("gender_4_retirement_value_check_joint_purchase", nil, self, person_index: 4), Form::Sales::Pages::PersonWorkingSituation.new("person_2_working_situation", nil, self, person_index: 3), - Form::Sales::Pages::RetirementValueCheck.new("person_4_working_situation_retirement_value_check", nil, self, person_index: 3), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_3_retirement_value_check", nil, self, person_index: 3), Form::Sales::Pages::PersonWorkingSituation.new("person_2_working_situation_joint_purchase", nil, self, person_index: 4), - Form::Sales::Pages::RetirementValueCheck.new("person_4_working_situation_retirement_value_check_joint_purchase", nil, self, person_index: 4), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_4_retirement_value_check_joint_purchase", nil, self, person_index: 4), Form::Sales::Pages::PersonKnown.new("person_3_known", nil, self, person_index: 4), Form::Sales::Pages::PersonKnown.new("person_3_known_joint_purchase", nil, self, person_index: 5), Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_3_relationship_to_buyer_1", nil, self, person_index: 4), Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_3_relationship_to_buyer_1_joint_purchase", nil, self, person_index: 5), Form::Sales::Pages::PersonAge.new("person_3_age", nil, self, person_index: 4), - Form::Sales::Pages::RetirementValueCheck.new("person_5_age_retirement_value_check", nil, self, person_index: 4), + Form::Sales::Pages::RetirementValueCheck.new("age_4_retirement_value_check", nil, self, person_index: 4), Form::Sales::Pages::PersonAge.new("person_3_age_joint_purchase", nil, self, person_index: 5), - Form::Sales::Pages::RetirementValueCheck.new("person_5_age_retirement_value_check_joint_purchase", nil, self, person_index: 5), + Form::Sales::Pages::RetirementValueCheck.new("age_5_retirement_value_check_joint_purchase", nil, self, person_index: 5), Form::Sales::Pages::PersonGenderIdentity.new("person_3_gender_identity", nil, self, person_index: 4), - Form::Sales::Pages::RetirementValueCheck.new("person_5_gender_retirement_value_check", nil, self, person_index: 4), + Form::Sales::Pages::RetirementValueCheck.new("gender_4_retirement_value_check", nil, self, person_index: 4), Form::Sales::Pages::PersonGenderIdentity.new("person_3_gender_identity_joint_purchase", nil, self, person_index: 5), - Form::Sales::Pages::RetirementValueCheck.new("person_5_gender_retirement_value_check_joint_purchase", nil, self, person_index: 5), + Form::Sales::Pages::RetirementValueCheck.new("gender_5_retirement_value_check_joint_purchase", nil, self, person_index: 5), Form::Sales::Pages::PersonWorkingSituation.new("person_3_working_situation", nil, self, person_index: 4), - Form::Sales::Pages::RetirementValueCheck.new("person_5_working_situation_retirement_value_check", nil, self, person_index: 4), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_4_retirement_value_check", nil, self, person_index: 4), Form::Sales::Pages::PersonWorkingSituation.new("person_3_working_situation_joint_purchase", nil, self, person_index: 5), - Form::Sales::Pages::RetirementValueCheck.new("person_5_working_situation_retirement_value_check_joint_purchase", nil, self, person_index: 5), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_5_retirement_value_check_joint_purchase", nil, self, person_index: 5), Form::Sales::Pages::PersonKnown.new("person_4_known", nil, self, person_index: 5), Form::Sales::Pages::PersonKnown.new("person_4_known_joint_purchase", nil, self, person_index: 6), Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_4_relationship_to_buyer_1", nil, self, person_index: 5), Form::Sales::Pages::PersonRelationshipToBuyer1.new("person_4_relationship_to_buyer_1_joint_purchase", nil, self, person_index: 6), Form::Sales::Pages::PersonAge.new("person_4_age", nil, self, person_index: 5), - Form::Sales::Pages::RetirementValueCheck.new("person_6_age_retirement_value_check", nil, self, person_index: 5), + Form::Sales::Pages::RetirementValueCheck.new("age_5_retirement_value_check", nil, self, person_index: 5), Form::Sales::Pages::PersonAge.new("person_4_age_joint_purchase", nil, self, person_index: 6), - Form::Sales::Pages::RetirementValueCheck.new("person_6_age_retirement_value_check_joint_purchase", nil, self, person_index: 6), + Form::Sales::Pages::RetirementValueCheck.new("age_6_retirement_value_check_joint_purchase", nil, self, person_index: 6), Form::Sales::Pages::PersonGenderIdentity.new("person_4_gender_identity", nil, self, person_index: 5), - Form::Sales::Pages::RetirementValueCheck.new("person_6_gender_retirement_value_check", nil, self, person_index: 5), + Form::Sales::Pages::RetirementValueCheck.new("gender_5_retirement_value_check", nil, self, person_index: 5), Form::Sales::Pages::PersonGenderIdentity.new("person_4_gender_identity_joint_purchase", nil, self, person_index: 6), - Form::Sales::Pages::RetirementValueCheck.new("person_6_gender_retirement_value_check_joint_purchase", nil, self, person_index: 6), + Form::Sales::Pages::RetirementValueCheck.new("gender_6_retirement_value_check_joint_purchase", nil, self, person_index: 6), Form::Sales::Pages::PersonWorkingSituation.new("person_4_working_situation", nil, self, person_index: 5), - Form::Sales::Pages::RetirementValueCheck.new("person_6_working_situation_retirement_value_check", nil, self, person_index: 5), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_5_retirement_value_check", nil, self, person_index: 5), Form::Sales::Pages::PersonWorkingSituation.new("person_4_working_situation_joint_purchase", nil, self, person_index: 6), - Form::Sales::Pages::RetirementValueCheck.new("person_6_working_situation_retirement_value_check_joint_purchase", nil, self, person_index: 6), + Form::Sales::Pages::RetirementValueCheck.new("working_situation_6_retirement_value_check_joint_purchase", nil, self, person_index: 6), ] end end diff --git a/spec/models/form/sales/subsections/household_characteristics_spec.rb b/spec/models/form/sales/subsections/household_characteristics_spec.rb index 64ca5469f..88bbbff19 100644 --- a/spec/models/form/sales/subsections/household_characteristics_spec.rb +++ b/spec/models/form/sales/subsections/household_characteristics_spec.rb @@ -17,11 +17,11 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model buyer_interview privacy_notice buyer_1_age - person_1_age_retirement_value_check - person_1_age_retirement_value_check_joint_purchase + age_1_retirement_value_check + age_1_retirement_value_check_joint_purchase buyer_1_gender_identity - person_1_gender_retirement_value_check - person_1_gender_retirement_value_check_joint_purchase + gender_1_retirement_value_check + gender_1_retirement_value_check_joint_purchase buyer_1_ethnic_group buyer_1_ethnic_background_black buyer_1_ethnic_background_asian @@ -30,20 +30,20 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model buyer_1_ethnic_background_white buyer_1_nationality buyer_1_working_situation - person_1_working_situation_retirement_value_check - person_1_working_situation_retirement_value_check_joint_purchase + working_situation_1_retirement_value_check + working_situation_1_retirement_value_check_joint_purchase working_situation_buyer_1_income_value_check buyer_1_live_in_property buyer_2_relationship_to_buyer_1 buyer_2_age - person_2_age_retirement_value_check - person_2_age_retirement_value_check_joint_purchase + age_2_retirement_value_check + age_2_retirement_value_check_joint_purchase buyer_2_gender_identity - person_2_gender_retirement_value_check - person_2_gender_retirement_value_check_joint_purchase + gender_2_retirement_value_check + gender_2_retirement_value_check_joint_purchase buyer_2_working_situation - person_2_working_situation_retirement_value_check - person_2_working_situation_retirement_value_check_joint_purchase + working_situation_2_retirement_value_check + working_situation_2_retirement_value_check_joint_purchase buyer_2_live_in_property number_of_others_in_property person_1_known @@ -51,65 +51,65 @@ RSpec.describe Form::Sales::Subsections::HouseholdCharacteristics, type: :model person_1_relationship_to_buyer_1 person_1_relationship_to_buyer_1_joint_purchase person_1_age - person_3_age_retirement_value_check + age_2_retirement_value_check person_1_age_joint_purchase - person_3_age_retirement_value_check_joint_purchase + age_3_retirement_value_check_joint_purchase person_1_gender_identity - person_3_gender_retirement_value_check + gender_2_retirement_value_check person_1_gender_identity_joint_purchase - person_3_gender_retirement_value_check_joint_purchase + gender_3_retirement_value_check_joint_purchase person_1_working_situation - person_3_working_situation_retirement_value_check + working_situation_2_retirement_value_check person_1_working_situation_joint_purchase - person_3_working_situation_retirement_value_check_joint_purchase + working_situation_3_retirement_value_check_joint_purchase person_2_known person_2_known_joint_purchase person_2_relationship_to_buyer_1 person_2_relationship_to_buyer_1_joint_purchase person_2_age - person_4_age_retirement_value_check + age_3_retirement_value_check person_2_age_joint_purchase - person_4_age_retirement_value_check_joint_purchase + age_4_retirement_value_check_joint_purchase person_2_gender_identity - person_4_gender_retirement_value_check + gender_3_retirement_value_check person_2_gender_identity_joint_purchase - person_4_gender_retirement_value_check_joint_purchase + gender_4_retirement_value_check_joint_purchase person_2_working_situation - person_4_working_situation_retirement_value_check + working_situation_3_retirement_value_check person_2_working_situation_joint_purchase - person_4_working_situation_retirement_value_check_joint_purchase + working_situation_4_retirement_value_check_joint_purchase person_3_known person_3_known_joint_purchase person_3_relationship_to_buyer_1 person_3_relationship_to_buyer_1_joint_purchase person_3_age - person_5_age_retirement_value_check + age_4_retirement_value_check person_3_age_joint_purchase - person_5_age_retirement_value_check_joint_purchase + age_5_retirement_value_check_joint_purchase person_3_gender_identity - person_5_gender_retirement_value_check + gender_4_retirement_value_check person_3_gender_identity_joint_purchase - person_5_gender_retirement_value_check_joint_purchase + gender_5_retirement_value_check_joint_purchase person_3_working_situation - person_5_working_situation_retirement_value_check + working_situation_4_retirement_value_check person_3_working_situation_joint_purchase - person_5_working_situation_retirement_value_check_joint_purchase + working_situation_5_retirement_value_check_joint_purchase person_4_known person_4_known_joint_purchase person_4_relationship_to_buyer_1 person_4_relationship_to_buyer_1_joint_purchase person_4_age - person_6_age_retirement_value_check + age_5_retirement_value_check person_4_age_joint_purchase - person_6_age_retirement_value_check_joint_purchase + age_6_retirement_value_check_joint_purchase person_4_gender_identity - person_6_gender_retirement_value_check + gender_5_retirement_value_check person_4_gender_identity_joint_purchase - person_6_gender_retirement_value_check_joint_purchase + gender_6_retirement_value_check_joint_purchase person_4_working_situation - person_6_working_situation_retirement_value_check + working_situation_5_retirement_value_check person_4_working_situation_joint_purchase - person_6_working_situation_retirement_value_check_joint_purchase + working_situation_6_retirement_value_check_joint_purchase ], ) end