mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-08 22:56:06 +00:00
Make fee type options in enterprise fees page translatable
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)'
|
||||
|
||||
Reference in New Issue
Block a user