Replace references to split_checkout directory in views and specs

This commit is contained in:
Cillian O'Ruanaidh
2023-12-01 11:27:43 +00:00
parent 931e42cf14
commit def027efb2
9 changed files with 14 additions and 14 deletions

View File

@@ -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

View File

@@ -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 }
)
)

View File

@@ -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"

View File

@@ -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}"

View File

@@ -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

View File

@@ -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")

View File

@@ -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

View File

@@ -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"

View File

@@ -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",