Make fee type options in enterprise fees page translatable

This commit is contained in:
luisramos0
2019-05-29 22:05:00 +01:00
parent 6e08310744
commit 1d4529092f
2 changed files with 3 additions and 3 deletions

View File

@@ -8,6 +8,6 @@ module EnterpriseFeesHelper
end
def enterprise_fee_type_options
EnterpriseFee::FEE_TYPES.map { |f| [f.capitalize, f] }
EnterpriseFee::FEE_TYPES.map { |fee_type| [t("#{fee_type}_fee"), fee_type] }
end
end

View File

@@ -18,7 +18,7 @@ feature '
click_link 'Enterprise Fees'
expect(page).to have_select "enterprise_fee_set_collection_attributes_0_enterprise_id"
expect(page).to have_select "enterprise_fee_set_collection_attributes_0_fee_type", selected: 'Packing'
expect(page).to have_select "enterprise_fee_set_collection_attributes_0_fee_type", selected: 'Packing fee'
expect(page).to have_selector "input[value='$0.50 / kg']"
expect(page).to have_select "enterprise_fee_set_collection_attributes_0_tax_category_id", selected: 'GST'
expect(page).to have_select "enterprise_fee_set_collection_attributes_0_calculator_type", selected: 'Flat Rate (per item)'
@@ -72,7 +72,7 @@ feature '
# Then I should see the updated fields for my fee
expect(page).to have_select "enterprise_fee_set_collection_attributes_0_enterprise_id", selected: 'Foo'
expect(page).to have_select "enterprise_fee_set_collection_attributes_0_fee_type", selected: 'Admin'
expect(page).to have_select "enterprise_fee_set_collection_attributes_0_fee_type", selected: 'Admin fee'
expect(page).to have_selector "input[value='Greetings!']"
expect(page).to have_select 'enterprise_fee_set_collection_attributes_0_tax_category_id', selected: 'Inherit From Product'
expect(page).to have_selector "option[selected]", text: 'Flat Percent (per item)'