Skip to content

Commit

Permalink
Merge pull request #6005 from solidusio/backport/v4.4/pr-5998
Browse files Browse the repository at this point in the history
[v4.4] [specs] Wait for modal before testing its content
  • Loading branch information
MadelineCollier authored Dec 4, 2024
2 parents ea8ea89 + 8fea128 commit b5f5e0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions admin/spec/features/refund_reasons_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
before do
visit "/admin/refund_reasons/#{query}"
click_on "Add new"
expect(page).to have_selector("dialog")
expect(page).to have_css("dialog", wait: 5)
expect(page).to have_content("New Refund Reason")
expect(page).to be_axe_clean
end
Expand Down Expand Up @@ -66,7 +66,7 @@
Spree::RefundReason.create(name: "Return process")
visit "/admin/refund_reasons#{query}"
find_row("Return process").click
expect(page).to have_selector("dialog")
expect(page).to have_css("dialog", wait: 5)
expect(page).to have_content("Edit Refund Reason")
expect(page).to be_axe_clean
end
Expand Down
4 changes: 2 additions & 2 deletions admin/spec/features/shipping_categories_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
before do
visit "/admin/shipping_categories#{query}"
click_on "Add new"
expect(page).to have_selector("dialog")
expect(page).to have_css("dialog", wait: 5)
expect(page).to have_content("New Shipping Category")
expect(page).to be_axe_clean
end
Expand Down Expand Up @@ -66,7 +66,7 @@
Spree::ShippingCategory.create(name: "Letter Mail")
visit "/admin/shipping_categories#{query}"
find_row("Letter Mail").click
expect(page).to have_selector("dialog")
expect(page).to have_css("dialog", wait: 5)
expect(page).to have_content("Edit Shipping Category")
expect(page).to be_axe_clean
end
Expand Down

0 comments on commit b5f5e0a

Please sign in to comment.