From 1abbfc01d2d0483acaa64a37617804d2a750e9a4 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 31 Aug 2023 10:02:06 +1000 Subject: [PATCH] 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. --- spec/system/admin/enterprise_fees_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/system/admin/enterprise_fees_spec.rb b/spec/system/admin/enterprise_fees_spec.rb index 22860c5083..d5f002657b 100644 --- a/spec/system/admin/enterprise_fees_spec.rb +++ b/spec/system/admin/enterprise_fees_spec.rb @@ -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!'