Make sure shipping modal gets closed

Also check the modal is not showing instead of checking it's hidden
This commit is contained in:
Gaetan Craig-Riou
2026-01-12 11:52:18 +11:00
parent 39245d55e2
commit a934b60f67
2 changed files with 3 additions and 3 deletions

View File

@@ -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"}

View File

@@ -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"