Skip to content

Commit e9b1425

Browse files
committed
Update feature tests to pass with turbo-confirm
1 parent 8c26e95 commit e9b1425

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

admin/spec/features/orders/show_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131

132132
expect(Spree::Order.last.line_items.last.quantity).to eq(4)
133133

134-
accept_confirm("Are you sure?") { click_on "Delete" }
134+
accept_turbo_confirm("Are you sure?") { click_on "Delete" }
135135
expect(page).to have_content("Line item removed successfully", wait: 5)
136136

137137
expect(Spree::Order.last.line_items.count).to eq(0)

admin/spec/features/products_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
visit "/admin/products"
3131
select_row("Just a product")
3232

33-
accept_confirm("Are you sure you want to delete 1 product?") do
33+
accept_turbo_confirm("Are you sure you want to delete 1 product?") do
3434
click_button("Delete", wait: 5)
3535
end
3636

@@ -48,7 +48,7 @@
4848
visit "/admin/products"
4949
find('main tbody tr:nth-child(2)').find('input').check
5050

51-
accept_confirm("Are you sure you want to discontinue 1 product?") do
51+
accept_turbo_confirm("Are you sure you want to discontinue 1 product?") do
5252
click_button "Discontinue"
5353
end
5454

@@ -66,7 +66,7 @@
6666

6767
find('main tbody tr:nth-child(2)').find('input').check
6868

69-
accept_confirm("Are you sure you want to activate 1 product?") do
69+
accept_turbo_confirm("Are you sure you want to activate 1 product?") do
7070
click_button "Activate"
7171
end
7272

admin/spec/features/users_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@
8282
expect(page).to have_content("Key generated")
8383
expect(page).to have_content("(hidden)")
8484

85-
click_on "Regenerate key"
85+
accept_turbo_confirm("Are you sure?") { click_on "Regenerate key" }
8686
expect(page).to have_content("Key generated")
8787
expect(page).to have_content("(hidden)")
8888

89-
click_on "Clear key"
89+
accept_turbo_confirm("Are you sure?") { click_on "Clear key" }
9090
expect(page).to have_content("Key cleared")
9191
expect(page).to have_content("No key")
9292

0 commit comments

Comments
 (0)