Browse Source

Update tests

CLDC-3654-Copy-changes-sales-property-information-questions
Manny Dinssa 6 days ago
parent
commit
bfb5249a0a
  1. 2
      app/models/form/sales/pages/percentage_discount_value_check.rb
  2. 4
      spec/models/form/sales/pages/monthly_charges_value_check_spec.rb
  3. 4
      spec/models/form/sales/pages/percentage_discount_value_check_spec.rb

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

@ -8,7 +8,7 @@ class Form::Sales::Pages::PercentageDiscountValueCheck < ::Form::Page
"arguments" => [{ "key" => "discount", "label" => true, "i18n_template" => "discount" }],
}
@informative_text = {
"translation" => "forms.#{form.start_date.year}.#{@copy_key}.hint_text",
"translation" => "forms.#{form.start_date.year}.#{@copy_key}.informative_text",
"arguments" => [],
}
end

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

@ -34,13 +34,13 @@ RSpec.describe Form::Sales::Pages::MonthlyChargesValueCheck, type: :model do
it "has correct title_text" do
expect(page.title_text).to eq({
"translation" => "forms.2024.sales.soft_validations.monthly_charges_over_soft_max.title_text",
"translation" => "forms.2024.sales.soft_validations.monthly_charges_value_check.title_text",
"arguments" => [{ "arguments_for_key" => "mscharge", "i18n_template" => "mscharge", "key" => "field_formatted_as_currency" }],
})
end
it "has correct informative_text" do
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.monthly_charges_over_soft_max.informative_text" })
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.monthly_charges_value_check.informative_text" })
end
it "has correct interruption_screen_question_ids" do

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

@ -22,14 +22,14 @@ RSpec.describe Form::Sales::Pages::PercentageDiscountValueCheck, type: :model do
it "has the correct title_text" do
expect(page.title_text).to eq({
"translation" => "forms.2024.sales.soft_validations.percentage_discount_value.title_text",
"translation" => "forms.2024.sales.soft_validations.percentage_discount_value_check.title_text",
"arguments" => [{ "key" => "discount", "label" => true, "i18n_template" => "discount" }],
})
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({
"translation" => "forms.2024.sales.soft_validations.percentage_discount_value.informative_text",
"translation" => "forms.2024.sales.soft_validations.percentage_discount_value_check.informative_text",
"arguments" => [],
})
end

Loading…
Cancel
Save