Browse Source

Update some missing/wrong keys

pull/2702/head
Kat 2 years ago
parent
commit
18d0044b1e
  1. 1
      app/models/form/sales/pages/buyer2_working_situation.rb
  2. 1
      app/models/form/sales/pages/gender_identity2.rb
  3. 5
      app/models/form/sales/pages/multiple_partners_value_check.rb
  4. 1
      app/models/form/sales/pages/not_retired_value_check.rb
  5. 5
      app/models/form/sales/pages/partner_under_16_value_check.rb
  6. 2
      app/models/form/sales/pages/person_student_not_child_value_check.rb
  7. 5
      app/models/form/sales/pages/retirement_value_check.rb
  8. 2
      app/models/form/sales/questions/buyer1_ethnic_background_arab.rb
  9. 1
      app/models/form/sales/questions/buyer2_working_situation.rb
  10. 1
      app/models/form/sales/questions/gender_identity2.rb
  11. 1
      config/locales/forms/2023/sales/soft_validations.en.yml
  12. 3
      config/locales/forms/2024/sales/soft_validations.en.yml
  13. 4
      spec/models/form/sales/pages/multiple_partners_value_check_spec.rb
  14. 12
      spec/models/form/sales/pages/partner_under16_value_check_spec.rb
  15. 2
      spec/models/form/sales/pages/person_student_not_child_value_check_spec.rb
  16. 12
      spec/models/form/sales/pages/retirement_value_check_spec.rb

1
app/models/form/sales/pages/buyer2_working_situation.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::Buyer2WorkingSituation < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_2_working_situation"
@copy_key = "sales.household_characteristics.ecstat2.buyer"
@depends_on = [
{
"joint_purchase?" => true,

1
app/models/form/sales/pages/gender_identity2.rb

@ -2,6 +2,7 @@ class Form::Sales::Pages::GenderIdentity2 < ::Form::Page
def initialize(id, hsh, subsection)
super
@id = "buyer_2_gender_identity"
@copy_key = "sales.household_characteristics.sex2.buyer"
@depends_on = [
{
"joint_purchase?" => true,

5
app/models/form/sales/pages/multiple_partners_value_check.rb

@ -12,7 +12,10 @@ class Form::Sales::Pages::MultiplePartnersValueCheck < Form::Sales::Pages::Perso
"translation" => "forms.#{form.start_date.year}.#{@copy_key}.title_text",
"arguments" => [],
}
@informative_text = {}
@informative_text = {
"translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text",
"arguments" => [],
}
end
def questions

1
app/models/form/sales/pages/not_retired_value_check.rb

@ -13,6 +13,7 @@ class Form::Sales::Pages::NotRetiredValueCheck < Form::Sales::Pages::Person
}
@informative_text = {
"translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text",
"arguments" => [],
}
end

5
app/models/form/sales/pages/partner_under_16_value_check.rb

@ -18,7 +18,10 @@ class Form::Sales::Pages::PartnerUnder16ValueCheck < Form::Sales::Pages::Person
},
],
}
@informative_text = {}
@informative_text = {
"translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text",
"arguments" => [],
}
end
def questions

2
app/models/form/sales/pages/person_student_not_child_value_check.rb

@ -11,7 +11,7 @@ class Form::Sales::Pages::PersonStudentNotChildValueCheck < Form::Sales::Pages::
@title_text = {
"translation" => "forms.#{form.start_date.year}.#{@copy_key}.title_text",
}
@informative_text = {}
@informative_text = { "translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text", "arguments" => [] }
end
def questions

5
app/models/form/sales/pages/retirement_value_check.rb

@ -18,7 +18,10 @@ class Form::Sales::Pages::RetirementValueCheck < Form::Sales::Pages::Person
},
],
}
@informative_text = {}
@informative_text = {
"translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text",
"arguments" => [],
}
end
def questions

2
app/models/form/sales/questions/buyer1_ethnic_background_arab.rb

@ -2,7 +2,7 @@ class Form::Sales::Questions::Buyer1EthnicBackgroundArab < ::Form::Question
def initialize(id, hsh, page)
super
@id = "ethnic"
@copy_key = "sales.household_characteristics.ethnic.ethnic_background_asian"
@copy_key = "sales.household_characteristics.ethnic.ethnic_background_arab"
@type = "radio"
@answer_options = ANSWER_OPTIONS
@check_answers_card_number = 1

1
app/models/form/sales/questions/buyer2_working_situation.rb

@ -2,6 +2,7 @@ class Form::Sales::Questions::Buyer2WorkingSituation < ::Form::Question
def initialize(id, hsh, page)
super
@id = "ecstat2"
@copy_key = "sales.household_characteristics.ecstat2.buyer"
@type = "radio"
@answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2

1
app/models/form/sales/questions/gender_identity2.rb

@ -3,6 +3,7 @@ class Form::Sales::Questions::GenderIdentity2 < ::Form::Question
super
@id = "sex2"
@type = "radio"
@copy_key = "sales.household_characteristics.sex2.buyer"
@answer_options = ANSWER_OPTIONS
@check_answers_card_number = 2
@inferred_check_answers_value = [{

1
config/locales/forms/2023/sales/soft_validations.en.yml

@ -111,6 +111,7 @@ en:
hint_text: ""
question_text: "Are you sure this person is not a child?"
title_text: "You told us this person is a student aged between 16 and 19."
informative_text: "Are you sure this person is not a child?"
partner_under_16_value_check:
page_header: ""
check_answer_label: "Partner under 16 confirmation"

3
config/locales/forms/2024/sales/soft_validations.en.yml

@ -111,15 +111,18 @@ en:
hint_text: ""
question_text: "Are you sure this person is not a child?"
title_text: "You told us this person is a student aged between 16 and 19."
informative_text: "Are you sure this person is not a child?"
partner_under_16_value_check:
page_header: ""
check_answer_label: "Partner under 16 confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us this person is aged %{age} years and has 'Partner' relationship to buyer 1."
informative_text: "Are you sure this is correct?"
multiple_partners_value_check:
page_header: ""
check_answer_label: "Multiple partners confirmation"
hint_text: ""
question_text: "Are you sure this is correct?"
title_text: "You told us there are more than 1 persons with 'Partner' relationship to buyer 1."
informative_text: "Are you sure this is correct?"

4
spec/models/form/sales/pages/multiple_partners_value_check_spec.rb

@ -46,7 +46,7 @@ RSpec.describe Form::Sales::Pages::MultiplePartnersValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.multiple_partners_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@ -78,7 +78,7 @@ RSpec.describe Form::Sales::Pages::MultiplePartnersValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.multiple_partners_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do

12
spec/models/form/sales/pages/partner_under16_value_check_spec.rb

@ -52,7 +52,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@ -90,7 +90,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@ -128,7 +128,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@ -166,7 +166,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@ -204,7 +204,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@ -242,7 +242,7 @@ RSpec.describe Form::Sales::Pages::PartnerUnder16ValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.partner_under_16_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do

2
spec/models/form/sales/pages/person_student_not_child_value_check_spec.rb

@ -29,7 +29,7 @@ RSpec.describe Form::Sales::Pages::PersonStudentNotChildValueCheck, type: :model
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.student_not_child_value_check.informative_text" })
end
it "has correct questions" do

12
spec/models/form/sales/pages/retirement_value_check_spec.rb

@ -52,7 +52,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@ -90,7 +90,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@ -128,7 +128,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@ -166,7 +166,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@ -204,7 +204,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" })
end
it "has correct interruption_screen_question_ids" do
@ -242,7 +242,7 @@ RSpec.describe Form::Sales::Pages::RetirementValueCheck, type: :model do
end
it "has correct informative_text" do
expect(page.informative_text).to eq({})
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.retirement_value_check.min.informative_text" })
end
it "has correct interruption_screen_question_ids" do

Loading…
Cancel
Save