Skip to content

Commit b5f5e0a

Browse files
Merge pull request #6005 from solidusio/backport/v4.4/pr-5998
[v4.4] [specs] Wait for modal before testing its content
2 parents ea8ea89 + 8fea128 commit b5f5e0a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

admin/spec/features/refund_reasons_spec.rb

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

admin/spec/features/shipping_categories_spec.rb

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

0 commit comments

Comments
 (0)