mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-08 22:56:06 +00:00
Stabilise enterprise fee spec
The problem here was that the second fee was created in a `let!` block that came after a `before` block which visited the page. In some cases it worked but sometimes the fee wasn't created yet when the page was loaded. Form changes in the second row were not affecting the second fee as intended.
This commit is contained in:
@@ -161,6 +161,7 @@ describe '
|
||||
let!(:fee1) { create(:enterprise_fee, fee_type: "sales", enterprise_id: enterprise.id) }
|
||||
|
||||
before do
|
||||
visit admin_enterprise_fees_path
|
||||
# edits the existing fee
|
||||
select 'Fundraising', from: "#{prefix}_fee_type"
|
||||
fill_in "#{prefix}_name", with: 'Hello!'
|
||||
|
||||
Reference in New Issue
Block a user