From 8d6f01690d0f1868ba6e46dca3a686207502339d Mon Sep 17 00:00:00 2001 From: Thomas von Deyen Date: Fri, 6 Dec 2024 12:49:56 +0100 Subject: [PATCH] tests: Give even more dialogs more time to open in tests These dialog tests fail often. We should give them more time to open. --- admin/spec/features/adjustment_reasons_spec.rb | 4 ++-- admin/spec/features/refund_reasons_spec.rb | 4 ++-- admin/spec/features/return_reasons_spec.rb | 4 ++-- admin/spec/features/roles_spec.rb | 4 ++-- admin/spec/features/shipping_categories_spec.rb | 4 ++-- admin/spec/features/store_credit_reasons_spec.rb | 4 ++-- admin/spec/features/tax_categories_spec.rb | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/admin/spec/features/adjustment_reasons_spec.rb b/admin/spec/features/adjustment_reasons_spec.rb index 5d663b7bd1..615dfa234f 100644 --- a/admin/spec/features/adjustment_reasons_spec.rb +++ b/admin/spec/features/adjustment_reasons_spec.rb @@ -33,7 +33,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end @@ -76,7 +76,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end diff --git a/admin/spec/features/refund_reasons_spec.rb b/admin/spec/features/refund_reasons_spec.rb index 1f5fe245df..19f8346491 100644 --- a/admin/spec/features/refund_reasons_spec.rb +++ b/admin/spec/features/refund_reasons_spec.rb @@ -33,7 +33,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end @@ -73,7 +73,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end diff --git a/admin/spec/features/return_reasons_spec.rb b/admin/spec/features/return_reasons_spec.rb index 46e2287509..41c978da8d 100644 --- a/admin/spec/features/return_reasons_spec.rb +++ b/admin/spec/features/return_reasons_spec.rb @@ -33,7 +33,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end @@ -75,7 +75,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end diff --git a/admin/spec/features/roles_spec.rb b/admin/spec/features/roles_spec.rb index c50e6acd13..625d048e2a 100644 --- a/admin/spec/features/roles_spec.rb +++ b/admin/spec/features/roles_spec.rb @@ -61,7 +61,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end @@ -130,7 +130,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end diff --git a/admin/spec/features/shipping_categories_spec.rb b/admin/spec/features/shipping_categories_spec.rb index fed55b4963..09ad72338f 100644 --- a/admin/spec/features/shipping_categories_spec.rb +++ b/admin/spec/features/shipping_categories_spec.rb @@ -33,7 +33,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end @@ -73,7 +73,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end diff --git a/admin/spec/features/store_credit_reasons_spec.rb b/admin/spec/features/store_credit_reasons_spec.rb index 697dc00dd9..fcbe4bbea6 100644 --- a/admin/spec/features/store_credit_reasons_spec.rb +++ b/admin/spec/features/store_credit_reasons_spec.rb @@ -33,7 +33,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end @@ -73,7 +73,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end diff --git a/admin/spec/features/tax_categories_spec.rb b/admin/spec/features/tax_categories_spec.rb index abf26eff14..463f673bfd 100644 --- a/admin/spec/features/tax_categories_spec.rb +++ b/admin/spec/features/tax_categories_spec.rb @@ -35,7 +35,7 @@ it "closing the modal keeps query params" do within("dialog") { click_on "Cancel" } - expect(page).not_to have_selector("dialog") + expect(page).not_to have_selector("dialog", wait: 5) expect(page.current_url).to include(query) end