diff --git a/features/support/env.rb b/features/support/env.rb index 0d2e93843..838d32dea 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -39,10 +39,10 @@ Capybara.default_driver = :selenium Capybara.default_selector = :css # 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 -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 # up to your step definition and out to cucumber unless you catch it somewhere diff --git a/features/support/matchers.rb b/features/support/matchers.rb index 71a4bb600..24ddc6ff8 100644 --- a/features/support/matchers.rb +++ b/features/support/matchers.rb @@ -27,9 +27,9 @@ end def await_condition &condition - start_time = Time.now + start_time = Time.zone.now 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 end true