diff --git a/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb b/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb index b3a97f6d2b..23ba80d3fb 100644 --- a/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb +++ b/app/assets/javascripts/admin/spree/orders/variant_autocomplete.js.erb @@ -201,7 +201,7 @@ ofnCancelOrderAlert = function(callback, i18nKey) { $('#custom-confirm .message').html( ` ${t(i18nKey)}
- +
`); $('#custom-confirm button.confirm').unbind( "click" ).click(() => { diff --git a/spec/system/admin/order_spec.rb b/spec/system/admin/order_spec.rb index 71eb64acd4..35b4c26f1b 100644 --- a/spec/system/admin/order_spec.rb +++ b/spec/system/admin/order_spec.rb @@ -172,6 +172,7 @@ describe ' context "it shows a second modal about last item deletion and therefore about order cancellation" do it "that the user can close and then nothing change" do expect(page).to have_content "This will cancel the current order." + expect(page).to have_checked_field "Send a cancellation email to the customer" within(".modal", visible: true) do click_on("Cancel") end @@ -184,6 +185,7 @@ describe ' it "and then the order is cancelled and no email is sent by default" do expect do within(".modal", visible: true) do + uncheck("send_cancellation_email") click_on("OK") end expect(page).to have_content "Cannot add item to canceled order" @@ -195,7 +197,6 @@ describe ' it "and check the checkbox to send an email to the customer about its order cancellation" do expect do within(".modal", visible: true) do - check("send_cancellation_email") click_on("OK") end expect(page).to have_content "Cannot add item to canceled order"