Ridiculously long cucumber timeout so we're more resiliant to travis traffic

This commit is contained in:
Sarah Mei 2011-09-05 12:08:29 -07:00
parent 13eb7fbb7b
commit cac4b1ba4e
2 changed files with 6 additions and 6 deletions

View file

@ -112,7 +112,7 @@ Then /^(?:|I )should not see a "([^\"]*)"(?: within "([^\"]*)")?$/ do |selector,
end
When /^I wait for the ajax to finish$/ do
wait_until(10) { evaluate_script("$.active") == 0 }
wait_until(30) { evaluate_script("$.active") == 0 }
end
When /^I have turned off jQuery effects$/ do
@ -162,17 +162,17 @@ Then /^the "([^"]*)" field(?: within "([^"]*)")? should be filled with "([^"]*)"
end
Then /^I should see (\d+) posts$/ do |n_posts|
wait_until(10) { all("#main_stream .stream_element").length == n_posts.to_i }
wait_until(30) { all("#main_stream .stream_element").length == n_posts.to_i }
end
Then /^I should see (\d+) contacts$/ do |n_posts|
wait_until(10) { all("#people_stream .stream_element").length == n_posts.to_i }
wait_until(30) { all("#people_stream .stream_element").length == n_posts.to_i }
end
And /^I scroll down$/ do
evaluate_script("window.scrollBy(0,3000000)")
sleep 1
wait_until(10) { evaluate_script('$("#infscr-loading:visible").length') == 0 }
wait_until(30) { evaluate_script('$("#infscr-loading:visible").length') == 0 }
end
Then /^the notification dropdown should be visible$/ do

View file

@ -22,8 +22,8 @@ require 'cucumber/rails/capybara_javascript_emulation' # Lets you click links wi
# steps to use the XPath syntax.
Capybara.default_selector = :css
# We have a higher default wait time to account for build machines of various beefiness.
Capybara.default_wait_time = 10
# We have a ridiculously high wait time to account for build machines of various beefiness.
Capybara.default_wait_time = 30
# 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