Update checkout_workflow and spec_helper to work with Selenium

This commit is contained in:
Rob Harrington
2018-05-31 21:23:49 +10:00
committed by luisramos0
parent 3ab7a3d62b
commit 1bad08c1c0
2 changed files with 4 additions and 4 deletions

View File

@@ -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 }

View File

@@ -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