Toggles shipping info section

This commit is contained in:
filipefurtad0
2021-10-20 18:58:06 +01:00
parent 21449ea711
commit c94b5d1598
2 changed files with 4 additions and 0 deletions

View File

@@ -53,6 +53,7 @@ module CheckoutRequestsHelper
return unless save_default_addresses
within "#shipping" do
find(:xpath, '//*[@id="shipping"]/ng-form/dd').click
check "Shipping address same as billing address?"
check "Save as default shipping address"
end

View File

@@ -313,8 +313,11 @@ describe "As a consumer I want to check out my cart", js: true do
it "checks out successfully" do
visit checkout_path
expect(page).to have_content "Shipping info"
find(:xpath, '//*[@id="shipping"]/ng-form/dd').click
find("input[value='#{shipping_with_fee.id}'").click
click_button "Next"
expect(page).to have_content "Payment"
find("input[value='#{check_without_fee.id}'").click