diff --git a/app/views/split_checkout/_payment.html.haml b/app/views/split_checkout/_payment.html.haml index e32e65b245..675fbfd820 100644 --- a/app/views/split_checkout/_payment.html.haml +++ b/app/views/split_checkout/_payment.html.haml @@ -1,5 +1,5 @@ .medium-6#checkout-payment-methods - - if @order.distributor.vouchers.present? + - if feature?(:vouchers, spree_current_user) && @order.distributor.vouchers.present? %div.checkout-substep = render partial: "split_checkout/voucher_section", locals: { order: @order, voucher_adjustment: @order.voucher_adjustments.first } diff --git a/spec/system/consumer/split_checkout_spec.rb b/spec/system/consumer/split_checkout_spec.rb index 2bcc9f1cd0..abf8a6f2f2 100644 --- a/spec/system/consumer/split_checkout_spec.rb +++ b/spec/system/consumer/split_checkout_spec.rb @@ -707,6 +707,8 @@ describe "As a consumer, I want to checkout my order" do end describe "vouchers" do + before { Flipper.enable :vouchers } + context "with no voucher available" do before do visit checkout_step_path(:payment) diff --git a/spec/system/consumer/split_checkout_tax_incl_spec.rb b/spec/system/consumer/split_checkout_tax_incl_spec.rb index 66edeff008..6663c6a970 100644 --- a/spec/system/consumer/split_checkout_tax_incl_spec.rb +++ b/spec/system/consumer/split_checkout_tax_incl_spec.rb @@ -106,6 +106,8 @@ describe "As a consumer, I want to see adjustment breakdown" do end context "when using a voucher" do + before { Flipper.enable :vouchers } + let!(:voucher) do create(:voucher, code: 'some_code', enterprise: distributor, amount: 10) end diff --git a/spec/system/consumer/split_checkout_tax_not_incl_spec.rb b/spec/system/consumer/split_checkout_tax_not_incl_spec.rb index 1109c1c600..5d9f9bcd5b 100644 --- a/spec/system/consumer/split_checkout_tax_not_incl_spec.rb +++ b/spec/system/consumer/split_checkout_tax_not_incl_spec.rb @@ -63,6 +63,7 @@ describe "As a consumer, I want to see adjustment breakdown" do before do # assures tax is charged in dependence of shipping address Spree::Config.set(tax_using_ship_address: true) + Flipper.enable :vouchers end describe "a not-included tax" do