mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-19 04:49:15 +00:00
Update checkout_workflow and spec_helper to work with Selenium
This commit is contained in:
committed by
luisramos0
parent
3ab7a3d62b
commit
1bad08c1c0
@@ -98,7 +98,7 @@ RSpec.configure do |config|
|
||||
def restart_phantomjs
|
||||
Capybara.send('session_pool').values
|
||||
.select { |s| s.driver.is_a?(Capybara::Selenium::Driver) }
|
||||
.each { |s| s.driver.restart}
|
||||
.each { |s| s.driver.reset! }
|
||||
end
|
||||
|
||||
config.before(:all) { restart_phantomjs }
|
||||
|
||||
@@ -4,15 +4,15 @@ module CheckoutWorkflow
|
||||
end
|
||||
|
||||
def checkout_as_guest
|
||||
find("button", text: "Checkout as guest").trigger "click"
|
||||
find("button", text: "Checkout as guest").click
|
||||
end
|
||||
|
||||
def place_order
|
||||
find("button", text: "Place order now").trigger "click"
|
||||
find("button", text: "Place order now").click
|
||||
end
|
||||
|
||||
def toggle_accordion(id)
|
||||
find("##{id} dd a").trigger "click"
|
||||
find("##{id} dd a").click
|
||||
end
|
||||
|
||||
def toggle_details
|
||||
|
||||
Reference in New Issue
Block a user