Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Give dialogs a little more time to open #6010

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions admin/spec/features/adjustment_reasons_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
before do
visit "/admin/adjustment_reasons#{query}"
click_on "Add new"
expect(page).to have_selector("dialog")
expect(page).to have_selector("dialog", wait: 5)
expect(page).to have_content("New Adjustment Reason")
expect(page).to be_axe_clean
end
Expand Down Expand Up @@ -69,7 +69,7 @@
Spree::AdjustmentReason.create(name: "Good Reason", code: 5999)
visit "/admin/adjustment_reasons#{query}"
find_row("Good Reason").click
expect(page).to have_selector("dialog")
expect(page).to have_selector("dialog", wait: 5)
expect(page).to have_content("Edit Adjustment Reason")
expect(page).to be_axe_clean
end
Expand Down
4 changes: 2 additions & 2 deletions admin/spec/features/return_reasons_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
before do
visit "/admin/return_reasons#{query}"
click_on "Add new"
expect(page).to have_selector("dialog")
expect(page).to have_selector("dialog", wait: 5)
expect(page).to have_content("New Return Reason")
expect(page).to be_axe_clean
end
Expand Down Expand Up @@ -68,7 +68,7 @@
Spree::ReturnReason.create(name: "Good Reason")
visit "/admin/return_reasons#{query}"
find_row("Good Reason").click
expect(page).to have_selector("dialog")
expect(page).to have_selector("dialog", wait: 5)
expect(page).to have_content("Edit Return Reason")
expect(page).to be_axe_clean
end
Expand Down
4 changes: 2 additions & 2 deletions admin/spec/features/roles_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
before do
visit "/admin/roles#{query}"
click_on "Add new"
expect(page).to have_selector("dialog")
expect(page).to have_selector("dialog", wait: 5)
expect(page).to have_content("New Role")
expect(page).to be_axe_clean
end
Expand Down Expand Up @@ -121,7 +121,7 @@
Spree::Role.create(name: "Reviewer", permission_sets: [settings_edit_permission])
visit "/admin/roles#{query}"
find_row("Reviewer").click
expect(page).to have_selector("dialog")
expect(page).to have_selector("dialog", wait: 5)
expect(page).to have_content("Edit Role")
expect(page).to be_axe_clean
expect(Spree::Role.find_by(name: "Reviewer").permission_set_ids)
Expand Down
4 changes: 2 additions & 2 deletions admin/spec/features/store_credit_reasons_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
before do
visit "/admin/store_credit_reasons#{query}"
click_on "Add new"
expect(page).to have_selector("dialog")
expect(page).to have_selector("dialog", wait: 5)
expect(page).to have_content("New Store Credit Reason")
expect(page).to be_axe_clean
end
Expand Down Expand Up @@ -66,7 +66,7 @@
Spree::StoreCreditReason.create(name: "New Customer Reward")
visit "/admin/store_credit_reasons#{query}"
find_row("New Customer Reward").click
expect(page).to have_selector("dialog")
expect(page).to have_selector("dialog", wait: 5)
expect(page).to have_content("Edit Store Credit Reason")
expect(page).to be_axe_clean
end
Expand Down
2 changes: 1 addition & 1 deletion admin/spec/features/tax_categories_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
before do
visit "/admin/tax_categories#{query}"
click_on "Add new"
expect(page).to have_selector("dialog")
expect(page).to have_selector("dialog", wait: 5)
expect(page).to have_content("New Tax Category")
expect(page).to be_axe_clean
end
Expand Down
Loading