Replace deprecated default_wait_time for Capybara

closes #6430
This commit is contained in:
Steffen van Bergerem 2015-09-27 03:06:54 +02:00 committed by Jonne Haß
parent ca215ca28d
commit baba71612d
2 changed files with 4 additions and 4 deletions

View file

@ -39,10 +39,10 @@ Capybara.default_driver = :selenium
Capybara.default_selector = :css Capybara.default_selector = :css
# We have a ridiculously high wait time to account for build machines of various beefiness. # We have a ridiculously high wait time to account for build machines of various beefiness.
# Capybara.default_wait_time = 30 # Capybara.default_max_wait_time = 30
# While there are a lot of failures, wait less, avoiding travis timeout # While there are a lot of failures, wait less, avoiding travis timeout
Capybara.default_wait_time = 15 Capybara.default_max_wait_time = 15
# If you set this to false, any error raised from within your app will bubble # If you set this to false, any error raised from within your app will bubble
# up to your step definition and out to cucumber unless you catch it somewhere # up to your step definition and out to cucumber unless you catch it somewhere

View file

@ -27,9 +27,9 @@ end
def await_condition &condition def await_condition &condition
start_time = Time.now start_time = Time.zone.now
until condition.call until condition.call
return false if (Time.now-start_time) > Capybara.default_wait_time return false if (Time.zone.now - start_time) > Capybara.default_max_wait_time
sleep 0.05 sleep 0.05
end end
true true