From ecd873be59a9a74480f521e5ff4a58d39fd43971 Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Mon, 10 Feb 2025 16:12:37 +1100 Subject: [PATCH] Fix flaky payment method spec This didn't come up on CI because CI is probably waiting long enough for the flash to disappear. But locally it failed every time for me. --- spec/system/admin/payment_method_spec.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/system/admin/payment_method_spec.rb b/spec/system/admin/payment_method_spec.rb index 7dd66633a7..e441c9c2be 100644 --- a/spec/system/admin/payment_method_spec.rb +++ b/spec/system/admin/payment_method_spec.rb @@ -317,6 +317,8 @@ RSpec.describe ' it "inserts values which persist" do expect(page).to have_content("you must save first before") click_button 'Update' + click_on "Dismiss" + fill_in "Flat Percent", with: '2.5' click_button 'Update' expect(page).to have_content("Payment Method has been successfully updated!") @@ -330,6 +332,8 @@ RSpec.describe ' it "inserts values which persist" do expect(page).to have_content("you must save first before") click_button 'Update' + click_on "Dismiss" + fill_in "Amount", with: 2.2 click_button 'Update' expect(page).to have_content("Payment Method has been successfully updated!") @@ -343,6 +347,8 @@ RSpec.describe ' it "inserts values which persist" do expect(page).to have_content("you must save first before") click_button 'Update' + click_on "Dismiss" + fill_in "First Item Cost", with: 2 fill_in "Additional Item Cost", with: 1.1 fill_in "Max Items", with: 10 @@ -360,6 +366,8 @@ RSpec.describe ' it "inserts values which persist" do expect(page).to have_content("you must save first before") click_button 'Update' + click_on "Dismiss" + fill_in "Amount", with: 2.2 click_button 'Update' expect(page).to have_content("Payment Method has been successfully updated!")