-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
139e88a
commit 9b3f3b4
Showing
2 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,13 +27,13 @@ def url_options | |
it "Works for Guests" do # rubocop:disable RSpec/ExampleLength | ||
visit(polymorphic_path(marketplace.room.location)) | ||
select(marketplace.delivery_areas.first.label, from: "cart[delivery_area_id]") | ||
click_on("Save changes") | ||
click_button("Save changes") | ||
|
||
add_product_to_cart(marketplace.products.first) | ||
|
||
expect(page).to have_content("Total: #{humanized_money_with_symbol(marketplace.products.first.price + marketplace.delivery_areas.first.price)}") | ||
|
||
click_on("Checkout") | ||
click_link("Checkout") | ||
|
||
set_delivery_details(delivery_address: "123 N West St Oakland, CA", | ||
contact_email: "[email protected]", | ||
|
@@ -62,19 +62,19 @@ def url_options | |
|
||
def add_product_to_cart(product) | ||
within("##{dom_id(product).gsub("product", "cart_product")}") do | ||
click_on(t("marketplace.cart_product_component.add")) | ||
click_link(t("marketplace.cart_product_component.add")) | ||
end | ||
end | ||
|
||
def set_delivery_details(delivery_address:, contact_phone_number:, contact_email:) | ||
fill_in("Delivery address", with: delivery_address) | ||
fill_in("Contact phone number", with: contact_phone_number) | ||
fill_in("Contact email", with: contact_email) | ||
click_on("Save changes") | ||
click_button("Save changes") | ||
end | ||
|
||
def pay(card_number:, card_expiry:, card_cvc:, billing_name:, email:, billing_postal_code:) | ||
click_on("Make Payment") | ||
click_button("Make Payment") | ||
fill_in("cardNumber", with: card_number) | ||
fill_in("cardExpiry", with: card_expiry) | ||
fill_in("cardCvc", with: card_cvc) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters