mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
The way we add items to the cart will change. Encapsulating that code in a common place will make the mobile ux work clearer and avoid merge conflicts. The waiting for background requests has also been improved and made more consistent which should make these specs more reliable.
22 lines
359 B
Ruby
22 lines
359 B
Ruby
module CheckoutWorkflow
|
|
def have_checkout_details
|
|
have_content "Your details"
|
|
end
|
|
|
|
def checkout_as_guest
|
|
click_button "Checkout as guest"
|
|
end
|
|
|
|
def place_order
|
|
find("button", text: "Place order now").click
|
|
end
|
|
|
|
def toggle_accordion(id)
|
|
find("##{id} dd a").click
|
|
end
|
|
|
|
def toggle_details
|
|
toggle_accordion :details
|
|
end
|
|
end
|