From 9ab672d0b1da982c96daff3b890fc813a24d734f Mon Sep 17 00:00:00 2001 From: filipefurtad0 Date: Sat, 11 Jun 2022 09:17:10 +0100 Subject: [PATCH] Restarts checkout flow for state 'confirmation' --- app/models/spree/order.rb | 2 +- spec/system/consumer/split_checkout_spec.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/spree/order.rb b/app/models/spree/order.rb index 4ffe08afaf..f161da24e9 100644 --- a/app/models/spree/order.rb +++ b/app/models/spree/order.rb @@ -433,7 +433,7 @@ module Spree all_adjustments.destroy_all payments.clear shipments.destroy_all - restart_checkout_flow if state == "payment" + restart_checkout_flow if state.in?(["payment", "confirmation"]) end def state_changed(name) diff --git a/spec/system/consumer/split_checkout_spec.rb b/spec/system/consumer/split_checkout_spec.rb index 50a2299d25..5488575bcd 100644 --- a/spec/system/consumer/split_checkout_spec.rb +++ b/spec/system/consumer/split_checkout_spec.rb @@ -884,7 +884,6 @@ describe "As a consumer, I want to checkout my order", js: true do end it "emptying the cart changes the order state back to address" do - pending "fixing issue #9299" visit main_app.cart_path expect { find('#clear_cart_link').click