Browse Source

Update tests

pull/2694/head
Manny Dinssa 8 months ago
parent
commit
9c304043f3
  1. 4
      spec/models/form/sales/pages/monthly_charges_value_check_spec.rb
  2. 4
      spec/models/form/sales/pages/no_address_found_spec.rb
  3. 4
      spec/models/form/sales/pages/percentage_discount_value_check_spec.rb

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" => "soft_validations.monthly_charges_over_soft_max.title_text",
"translation" => "forms.2024.sales.soft_validations.monthly_charges_over_soft_max.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" => "soft_validations.monthly_charges_over_soft_max.hint_text" })
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.monthly_charges_over_soft_max.informative_text" })
end
it "has correct interruption_screen_question_ids" do

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

@ -32,11 +32,11 @@ RSpec.describe Form::Sales::Pages::NoAddressFound, type: :model do
end
it "has the correct title_text" do
expect(page.title_text).to eq({ "arguments" => [], "translation" => "soft_validations.no_address_found.title_text" })
expect(page.title_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.address_search_value_check.title_text" })
end
it "has the correct informative_text" do
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "soft_validations.no_address_found.informative_text" })
expect(page.informative_text).to eq({ "arguments" => [], "translation" => "forms.2024.sales.soft_validations.address_search_value_check.informative_text" })
end
it "has the 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" => "soft_validations.percentage_discount_value.title_text",
"translation" => "forms.2024.sales.soft_validations.percentage_discount_value.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" => "soft_validations.percentage_discount_value.hint_text",
"translation" => "forms.2024.sales.soft_validations.percentage_discount_value.informative_text",
"arguments" => [],
})
end

Loading…
Cancel
Save