@ -2,9 +2,14 @@ class Form::Sales::Pages::Age1 < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_1_age"
@depends_on = [{
"privacynotice" => 1,
}]
@depends_on = [
{
},
"noint" => 1,
]
end
def questions
@ -2,10 +2,16 @@ class Form::Sales::Pages::Age2 < ::Form::Page
@id = "buyer_2_age"
"jointpur" => 1,
@ -2,9 +2,14 @@ class Form::Sales::Pages::Buyer1EthnicGroup < ::Form::Page
@id = "buyer_1_ethnic_group"
@ -2,9 +2,14 @@ class Form::Sales::Pages::Buyer1LiveInProperty < ::Form::Page
@id = "buyer_1_live_in_property"
@ -2,9 +2,14 @@ class Form::Sales::Pages::Buyer1WorkingSituation < ::Form::Page
@id = "buyer_1_working_situation"
@ -2,10 +2,16 @@ class Form::Sales::Pages::Buyer2LiveInProperty < ::Form::Page
@id = "buyer_2_live_in_property"
@ -2,10 +2,16 @@ class Form::Sales::Pages::Buyer2RelationshipToBuyer1 < ::Form::Page
@id = "buyer_2_relationship_to_buyer_1"
@ -2,10 +2,16 @@ class Form::Sales::Pages::Buyer2WorkingSituation < ::Form::Page
@id = "buyer_2_working_situation"
@ -2,9 +2,14 @@ class Form::Sales::Pages::GenderIdentity1 < ::Form::Page
@id = "buyer_1_gender_identity"
@ -2,10 +2,16 @@ class Form::Sales::Pages::GenderIdentity2 < ::Form::Page
@id = "buyer_2_gender_identity"
@ -2,9 +2,14 @@ class Form::Sales::Pages::Nationality1 < ::Form::Page
@id = "buyer_1_nationality"
@ -2,9 +2,14 @@ class Form::Sales::Pages::NumberOfOthersInProperty < ::Form::Page
@id = "number_of_others_in_property"
@ -3,6 +3,9 @@ class Form::Sales::Pages::PrivacyNotice < ::Form::Page
@id = "privacy_notice"
@header = "Department for Levelling Up, Housing and Communities privacy notice"
"noint" => 2,
@ -28,6 +28,6 @@ RSpec.describe Form::Sales::Pages::Age1, type: :model do
it "has correct depends_on" do
expect(page.depends_on).to eq([{ "privacynotice" => 1 }])
expect(page.depends_on).to eq([{ "privacynotice" => 1 }, { "noint" => 1 }])
@ -28,9 +28,15 @@ RSpec.describe Form::Sales::Pages::Age2, type: :model do
expect(page.depends_on).to eq([{
}])
expect(page.depends_on).to eq([
])
@ -28,6 +28,6 @@ RSpec.describe Form::Sales::Pages::Buyer1EthnicGroup, type: :model do
@ -28,6 +28,6 @@ RSpec.describe Form::Sales::Pages::Buyer1LiveInProperty, type: :model do
@ -28,6 +28,15 @@ RSpec.describe Form::Sales::Pages::Buyer2LiveInProperty, type: :model do
expect(page.depends_on).to eq([{ "jointpur" => 1, "privacynotice" => 1 }])
@ -28,9 +28,15 @@ RSpec.describe Form::Sales::Pages::Buyer2RelationshipToBuyer1, type: :model do
@ -28,9 +28,15 @@ RSpec.describe Form::Sales::Pages::Buyer2WorkingSituation, type: :model do
@ -28,6 +28,6 @@ RSpec.describe Form::Sales::Pages::GenderIdentity1, type: :model do
@ -28,9 +28,15 @@ RSpec.describe Form::Sales::Pages::GenderIdentity2, type: :model do
@ -28,6 +28,6 @@ RSpec.describe Form::Sales::Pages::Nationality1, type: :model do
@ -28,6 +28,6 @@ RSpec.describe Form::Sales::Pages::PrivacyNotice, type: :model do
expect(page.depends_on).to be_nil
expect(page.depends_on).to eq([{ "noint" => 2 }])