mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix failing spec [OFN-11613]
This commit is contained in:
@@ -12,6 +12,9 @@ export const useOpenAndCloseAsAModal = (controller) => {
|
||||
}.bind(controller),
|
||||
|
||||
close: function (_event, remove = false) {
|
||||
// Only execute close if there is an open modal
|
||||
if (!document.querySelector("body").classList.contains('modal-open')) return;
|
||||
|
||||
this.modalTarget.classList.remove("in");
|
||||
this.backgroundTarget.classList.remove("in");
|
||||
document.querySelector("body").classList.remove("modal-open");
|
||||
|
||||
@@ -125,8 +125,9 @@ RSpec.describe 'Subscriptions' do
|
||||
select_datetime_from_datepicker Time.zone.at(1.month.from_now)
|
||||
find("body").send_keys(:escape)
|
||||
|
||||
click_button 'Save'
|
||||
|
||||
# Click save and comfirm in warning modal (because date time range value was changed)
|
||||
click_button('Save')
|
||||
click_button('Proceed anyway')
|
||||
visit edit_admin_subscription_path(subscription)
|
||||
click_button 'edit-products'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user