Update to the right link the "Back to Payment method" button

+ create a spec as well
This commit is contained in:
Jean-Baptiste Bellet
2022-02-11 15:01:53 +01:00
parent 6e2c4a385a
commit 43cd604405
2 changed files with 11 additions and 1 deletions

View File

@@ -77,5 +77,5 @@
.medium-6
.checkout-submit
= f.submit t("split_checkout.step3.submit"), name: "confirm_order", class: "button primary", disabled: @terms_and_conditions_accepted == false || @platform_tos_accepted == false
%a.button.cancel{href: main_app.cart_path}
%a.button.cancel{href: main_app.checkout_step_path(:payment)}
= t("split_checkout.step3.cancel")

View File

@@ -260,6 +260,16 @@ describe "As a consumer, I want to checkout my order", js: true do
end
end
describe "navigation available" do
it "redirect to Payment method step by clicking on 'Back to payment method' button" do
visit checkout_step_path(:summary)
click_on "Back to Payment method"
expect(page).to have_content "You can review and confirm your order in the next step which includes the final costs."
end
end
describe "terms and conditions" do
context "when none are required" do
it "doesn't show checkbox or links" do