Files
openfoodnetwork/spec/support/request/checkout_workflow.rb
Maikel Linke 70347148a1 Stabilise shopping specs and open them for change
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.
2020-06-26 09:55:57 +10:00

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