mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Merge pull request #10406 from jibees/10402-error-when-no-shipping-info-has-been-selected-in-split-checkout
SplitCheckout: Fix an issue raised when first time checkout user submit form without selecting shipping method
This commit is contained in:
@@ -15,7 +15,7 @@ class DefaultAddressUpdater
|
||||
assign_bill_addresses
|
||||
assign_ship_addresses
|
||||
|
||||
customer.save
|
||||
customer&.save
|
||||
user&.save
|
||||
end
|
||||
|
||||
|
||||
@@ -284,6 +284,18 @@ describe "As a consumer, I want to checkout my order" do
|
||||
visit checkout_path
|
||||
end
|
||||
|
||||
context "when no selecting a shipping method" do
|
||||
before do
|
||||
fill_out_details
|
||||
fill_out_billing_address
|
||||
end
|
||||
|
||||
it "errors is shown to the user when submitting the form" do
|
||||
click_button "Next - Payment method"
|
||||
expect(page).to have_content "Select a shipping method"
|
||||
end
|
||||
end
|
||||
|
||||
context "details step" do
|
||||
context "when form is submitted but invalid" do
|
||||
it "display the checkbox about shipping address same as billing address when selecting a shipping method that requires ship address" do
|
||||
|
||||
Reference in New Issue
Block a user