mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
Merge pull request #8359 from filipefurtad0/fix_flaky_checkout_auth_spec
Switches to css to select accordion element
This commit is contained in:
@@ -13,14 +13,6 @@ module CheckoutRequestsHelper
|
||||
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
|
||||
|
||||
def fill_out_details
|
||||
within "#details" do
|
||||
fill_in "First Name", with: "Will"
|
||||
|
||||
@@ -55,7 +55,7 @@ describe "As a consumer I want to check out my cart", js: true do
|
||||
within(".login-modal") { click_button 'Login' }
|
||||
|
||||
expect(page).to have_content "Your details"
|
||||
toggle_details
|
||||
page.find(:css, "i.ofn-i_052-point-down").click
|
||||
|
||||
expect(page).to have_field 'First Name', with: 'Foo'
|
||||
expect(page).to have_field 'Last Name', with: 'Bar'
|
||||
|
||||
Reference in New Issue
Block a user