From ad585f1eab18271b6a034199347755dcd7f38322 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Wed, 21 Aug 2024 13:28:03 -0600 Subject: [PATCH 1/2] Adds retry option to flaky test case ...does so on another flaky test case --- spec/system/admin/order_cycles/edit_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/system/admin/order_cycles/edit_spec.rb b/spec/system/admin/order_cycles/edit_spec.rb index c3899aa35e7..82f1cd08bc1 100644 --- a/spec/system/admin/order_cycles/edit_spec.rb +++ b/spec/system/admin/order_cycles/edit_spec.rb @@ -62,7 +62,7 @@ end context 'with no attached order' do - it "does not show warning modal" do + it "does not show warning modal", retry: 3 do login_as_admin visit edit_admin_order_cycle_path(order_cycle) @@ -134,7 +134,7 @@ end context 'with no attached orders' do - it "does not show warning modal" do + it "does not show warning modal", retry: 3 do login_as_admin visit edit_admin_order_cycle_path(order_cycle) From 32cd14ef5482f957257c8b8fee8e644eb2641613 Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Thu, 22 Aug 2024 15:52:47 -0600 Subject: [PATCH 2/2] Adds slep(2) --- spec/system/admin/order_cycles/edit_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/system/admin/order_cycles/edit_spec.rb b/spec/system/admin/order_cycles/edit_spec.rb index 82f1cd08bc1..bb418711aed 100644 --- a/spec/system/admin/order_cycles/edit_spec.rb +++ b/spec/system/admin/order_cycles/edit_spec.rb @@ -141,6 +141,7 @@ # change non-date range field value fill_in 'order_cycle_name', with: "OC1 name updated" expect(page).to have_content('You have unsaved changes') + sleep(2) # click save click_button('Save') @@ -155,6 +156,7 @@ find("button", text: "Close").click end expect(page).to have_content('You have unsaved changes') + sleep(2) click_button('Save') expect(page).to have_content('Your order cycle has been updated.')