Merge pull request #8870 from jibees/8853-handle-back-button-on-summary-page-for-the-split-checkout

Split checkout: handle the link for "Back to Payment method" button in the summary page
This commit is contained in:
Filipe
2022-02-14 18:29:11 +00:00
committed by GitHub
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