diff --git a/app/controllers/checkout_controller.rb b/app/controllers/checkout_controller.rb index 6964873c95..4de176a7a7 100644 --- a/app/controllers/checkout_controller.rb +++ b/app/controllers/checkout_controller.rb @@ -58,7 +58,7 @@ class CheckoutController < BaseController flash.now[:error] ||= I18n.t('split_checkout.errors.saving_failed') render status: :unprocessable_entity, cable_ready: cable_car. - replace("#checkout", partial("split_checkout/checkout")). + replace("#checkout", partial("checkout/checkout")). replace("#flashes", partial("shared/flashes", locals: { flashes: flash })) end diff --git a/app/controllers/voucher_adjustments_controller.rb b/app/controllers/voucher_adjustments_controller.rb index 25deeaeea3..7fd4be3d70 100644 --- a/app/controllers/voucher_adjustments_controller.rb +++ b/app/controllers/voucher_adjustments_controller.rb @@ -62,7 +62,7 @@ class VoucherAdjustmentsController < BaseController def update_payment_section render cable_ready: cable_car.replace( selector: "#checkout-payment-methods", - html: render_to_string(partial: "split_checkout/payment", locals: { step: "payment" }) + html: render_to_string(partial: "checkout/payment", locals: { step: "payment" }) ) end @@ -74,7 +74,7 @@ class VoucherAdjustmentsController < BaseController replace( "#voucher-section", partial( - "split_checkout/voucher_section", + "checkout/voucher_section", locals: { order: @order, voucher_adjustment: @order.voucher_adjustments.first } ) ) diff --git a/app/views/checkout/_checkout.html.haml b/app/views/checkout/_checkout.html.haml index f26c8c4ca9..b1f3d49e7a 100644 --- a/app/views/checkout/_checkout.html.haml +++ b/app/views/checkout/_checkout.html.haml @@ -1,4 +1,4 @@ %checkout.row#checkout .small-12.medium-12.columns - = render partial: "split_checkout/tabs" - = render partial: "split_checkout/form" + = render partial: "checkout/tabs" + = render partial: "checkout/form" diff --git a/app/views/checkout/_form.html.haml b/app/views/checkout/_form.html.haml index afedf10ebd..649806a85a 100644 --- a/app/views/checkout/_form.html.haml +++ b/app/views/checkout/_form.html.haml @@ -2,4 +2,4 @@ = inject_saved_credit_cards %div.checkout-step{ class: "#{'checkout-summary' if checkout_step?(:summary)}" } - = render "split_checkout/#{checkout_step}" + = render "checkout/#{checkout_step}" diff --git a/app/views/checkout/_payment.html.haml b/app/views/checkout/_payment.html.haml index a0fc430e8a..619cc14712 100644 --- a/app/views/checkout/_payment.html.haml +++ b/app/views/checkout/_payment.html.haml @@ -1,7 +1,7 @@ .medium-6#checkout-payment-methods - if feature?(:vouchers, spree_current_user, @order.distributor) && @order.distributor.vouchers.present? %div.checkout-substep - = render partial: "split_checkout/voucher_section", locals: { order: @order, voucher_adjustment: @order.voucher_adjustments.first } + = render partial: "checkout/voucher_section", locals: { order: @order, voucher_adjustment: @order.voucher_adjustments.first } = form_with url: checkout_update_path(local_assigns[:step] || checkout_step), model: @order, method: :put, data: { remote: "true" } do |f| %div.checkout-substep{"data-controller": "paymentmethod"} @@ -31,7 +31,7 @@ .paymentmethod-description.panel #{payment_method.description} .paymentmethod-form - = render partial: "split_checkout/payment/#{payment_method.method_type}", locals: { payment_method: payment_method, f: f } + = render partial: "checkout/payment/#{payment_method.method_type}", locals: { payment_method: payment_method, f: f } = f.error_message_on :payment_method, standalone: true diff --git a/app/views/checkout/_summary.html.haml b/app/views/checkout/_summary.html.haml index 0d0cb0b975..32013ff5f5 100644 --- a/app/views/checkout/_summary.html.haml +++ b/app/views/checkout/_summary.html.haml @@ -1,6 +1,6 @@ = form_with url: checkout_update_path(checkout_step), model: @order, method: :put, data: { remote: "true" } do |f| .summary-main - = render partial: "split_checkout/already_ordered" if show_bought_items? && checkout_step?(:summary) + = render partial: "checkout/already_ordered" if show_bought_items? && checkout_step?(:summary) .checkout-substep .checkout-title = t("split_checkout.step3.delivery_details.title") diff --git a/spec/routing/stripe_spec.rb b/spec/routing/stripe_spec.rb index 31eddad553..b4f5c4b7d7 100644 --- a/spec/routing/stripe_spec.rb +++ b/spec/routing/stripe_spec.rb @@ -6,12 +6,12 @@ describe "routing for Stripe return URLS", type: :routing do context "checkout return URLs" do it "routes /checkout to checkout#edit" do expect(get: "checkout"). - to route_to("split_checkout#edit") + to route_to("checkout#edit") end it "routes /checkout?test=123 to checkout#edit" do expect(get: "/checkout?test=123"). - to route_to(controller: "split_checkout", action: "edit", test: "123") + to route_to(controller: "checkout", action: "edit", test: "123") end it "routes /checkout?payment_intent=pm_123 to payment_gateways/stripe#confirm" do diff --git a/spec/system/consumer/shopping/checkout_auth_spec.rb b/spec/system/consumer/shopping/checkout_auth_spec.rb index 7244b8284b..088eb85e73 100644 --- a/spec/system/consumer/shopping/checkout_auth_spec.rb +++ b/spec/system/consumer/shopping/checkout_auth_spec.rb @@ -29,7 +29,7 @@ describe "As a consumer I want to check out my cart" do add_product_to_cart order, product end - context "on split_checkout" do + context "on checkout" do it "does not render the login form when logged in" do login_as user visit checkout_path @@ -58,7 +58,7 @@ describe "As a consumer I want to check out my cart" do within(".login-modal") { click_button 'Login' } end - context "and populating user details on (split_checkout)" do + context "and populating user details" do it "should allow proceeding to the next step" do expect(page).to have_content("Logged in successfully") click_button "Next - Payment method" diff --git a/spec/views/checkout/_voucher_section.html.haml_spec.rb b/spec/views/checkout/_voucher_section.html.haml_spec.rb index be940910ce..90683f7c57 100644 --- a/spec/views/checkout/_voucher_section.html.haml_spec.rb +++ b/spec/views/checkout/_voucher_section.html.haml_spec.rb @@ -2,7 +2,7 @@ require "spec_helper" -describe "split_checkout/_voucher_section.html.haml" do +describe "checkout/_voucher_section.html.haml" do let(:order) { create(:order_with_distributor, total: 10) } let(:flat_voucher) { create(:voucher_flat_rate, code: "flat_code",