* removed wait_until where possible * replaced wait_until with DOM obersavtions * added match: :first to all finders that assumed getting the first element * replaced evaluate_script with execute_script where possible * replaced a few execute_script with DOM observations through Capybara * removed sleep where possible * replaced sleep with DOM obersvations * replaced "wait for ajax" with DOM obersavations * replaced alert confirmation with new selenium API * bump selenium webdriver * made any other fixes to get green again
37 lines
678 B
Ruby
37 lines
678 B
Ruby
module DebuggingCukeHelpers
|
|
def start_debugging
|
|
require 'pry'
|
|
binding.pry
|
|
true
|
|
end
|
|
end
|
|
|
|
World(DebuggingCukeHelpers)
|
|
|
|
|
|
When 'I debug' do
|
|
start_debugging
|
|
end
|
|
|
|
When /^I wait for (\d+) seconds?$/ do |seconds|
|
|
sleep seconds.to_i
|
|
warn "\nDELETEME - this step is for debugging, only!\n"
|
|
end
|
|
|
|
When /^I open the error console$/ do
|
|
page.driver.browser.action.
|
|
key_down(:control).
|
|
key_down(:shift).
|
|
send_keys("j").
|
|
key_up(:shift).
|
|
key_up(:control).perform
|
|
end
|
|
|
|
When /^I open the web console$/ do
|
|
page.driver.browser.action.
|
|
key_down(:control).
|
|
key_down(:shift).
|
|
send_keys("k").
|
|
key_up(:shift).
|
|
key_up(:control).perform
|
|
end
|