Skip to content

Commit bfdf4bb

Browse files
authored
Merge pull request #6012 from solidusio/backport/v4.4/pr-6010
[v4.4] tests: Give dialogs a little more time to open
2 parents da7a72d + a4677fa commit bfdf4bb

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

admin/spec/features/adjustment_reasons_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
before do
2727
visit "/admin/adjustment_reasons#{query}"
2828
click_on "Add new"
29-
expect(page).to have_selector("dialog")
29+
expect(page).to have_selector("dialog", wait: 5)
3030
expect(page).to have_content("New Adjustment Reason")
3131
expect(page).to be_axe_clean
3232
end
@@ -69,7 +69,7 @@
6969
Spree::AdjustmentReason.create(name: "Good Reason", code: 5999)
7070
visit "/admin/adjustment_reasons#{query}"
7171
find_row("Good Reason").click
72-
expect(page).to have_selector("dialog")
72+
expect(page).to have_selector("dialog", wait: 5)
7373
expect(page).to have_content("Edit Adjustment Reason")
7474
expect(page).to be_axe_clean
7575
end

admin/spec/features/return_reasons_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
before do
2727
visit "/admin/return_reasons#{query}"
2828
click_on "Add new"
29-
expect(page).to have_selector("dialog")
29+
expect(page).to have_selector("dialog", wait: 5)
3030
expect(page).to have_content("New Return Reason")
3131
expect(page).to be_axe_clean
3232
end
@@ -68,7 +68,7 @@
6868
Spree::ReturnReason.create(name: "Good Reason")
6969
visit "/admin/return_reasons#{query}"
7070
find_row("Good Reason").click
71-
expect(page).to have_selector("dialog")
71+
expect(page).to have_selector("dialog", wait: 5)
7272
expect(page).to have_content("Edit Return Reason")
7373
expect(page).to be_axe_clean
7474
end

admin/spec/features/roles_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
before do
5555
visit "/admin/roles#{query}"
5656
click_on "Add new"
57-
expect(page).to have_selector("dialog")
57+
expect(page).to have_selector("dialog", wait: 5)
5858
expect(page).to have_content("New Role")
5959
expect(page).to be_axe_clean
6060
end
@@ -121,7 +121,7 @@
121121
Spree::Role.create(name: "Reviewer", permission_sets: [settings_edit_permission])
122122
visit "/admin/roles#{query}"
123123
find_row("Reviewer").click
124-
expect(page).to have_selector("dialog")
124+
expect(page).to have_selector("dialog", wait: 5)
125125
expect(page).to have_content("Edit Role")
126126
expect(page).to be_axe_clean
127127
expect(Spree::Role.find_by(name: "Reviewer").permission_set_ids)

admin/spec/features/store_credit_reasons_spec.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
before do
2727
visit "/admin/store_credit_reasons#{query}"
2828
click_on "Add new"
29-
expect(page).to have_selector("dialog")
29+
expect(page).to have_selector("dialog", wait: 5)
3030
expect(page).to have_content("New Store Credit Reason")
3131
expect(page).to be_axe_clean
3232
end
@@ -66,7 +66,7 @@
6666
Spree::StoreCreditReason.create(name: "New Customer Reward")
6767
visit "/admin/store_credit_reasons#{query}"
6868
find_row("New Customer Reward").click
69-
expect(page).to have_selector("dialog")
69+
expect(page).to have_selector("dialog", wait: 5)
7070
expect(page).to have_content("Edit Store Credit Reason")
7171
expect(page).to be_axe_clean
7272
end

admin/spec/features/tax_categories_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
before do
2929
visit "/admin/tax_categories#{query}"
3030
click_on "Add new"
31-
expect(page).to have_selector("dialog")
31+
expect(page).to have_selector("dialog", wait: 5)
3232
expect(page).to have_content("New Tax Category")
3333
expect(page).to be_axe_clean
3434
end

0 commit comments

Comments
 (0)