mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Make sure shipping modal gets closed
Also check the modal is not showing instead of checking it's hidden
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
= render ConfirmModalComponent.new(id: dom_id(@order, :ship), confirm_reflexes: "click->Admin::OrdersReflex#ship", controller: "orders", reflex: "Admin::Orders#ship") do
|
||||
= render ConfirmModalComponent.new(id: dom_id(@order, :ship), confirm_actions: "click->modal#close", confirm_reflexes: "click->Admin::OrdersReflex#ship", controller: "orders", reflex: "Admin::Orders#ship") do
|
||||
%div{class: "margin-bottom-30"}
|
||||
%p= t('spree.admin.orders.shipment.mark_as_shipped_message_html')
|
||||
%div{class: "margin-bottom-30"}
|
||||
|
||||
@@ -555,7 +555,7 @@ RSpec.describe '
|
||||
find_button("Confirm").click
|
||||
end
|
||||
|
||||
expect(page).to have_selector('.reveal-modal', visible: false)
|
||||
expect(page).not_to have_content("This will mark the order as Shipped.")
|
||||
expect(page).to have_content "SHIPPED"
|
||||
click_link('Order Details') unless subpage == 'Order Details'
|
||||
|
||||
@@ -578,7 +578,7 @@ RSpec.describe '
|
||||
find_button("Confirm").click
|
||||
end
|
||||
|
||||
expect(page).to have_selector('.reveal-modal', visible: false)
|
||||
expect(page).not_to have_content("This will mark the order as Shipped.")
|
||||
click_link('Order Details') unless subpage == 'Order Details'
|
||||
|
||||
expect(page).to have_content "SHIPPED"
|
||||
|
||||
Reference in New Issue
Block a user