summaryrefslogtreecommitdiff
path: root/features/support
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2015-04-25 14:22:21 -0400
committerRobert Speicher <rspeicher@gmail.com>2015-04-25 21:33:16 -0400
commit1e3fc84cd1d0aa004fb69d18ca392af8877cc07a (patch)
tree271e44cf8d32d65a972aca4ca06ee8f69d237edf /features/support
parent55831a4d50dc66973c0cfa28f58b5ac1a7c42ab7 (diff)
downloadgitlab-ce-1e3fc84cd1d0aa004fb69d18ca392af8877cc07a.tar.gz
Reduce timeout for non-CI features
Diffstat (limited to 'features/support')
-rw-r--r--features/support/capybara.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/features/support/capybara.rb b/features/support/capybara.rb
index 9a2df74d7be..8c6f4233278 100644
--- a/features/support/capybara.rb
+++ b/features/support/capybara.rb
@@ -1,16 +1,19 @@
require 'spinach/capybara'
require 'capybara/poltergeist'
+# Give CI some extra time
+timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 10
+
Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app|
- Capybara::Poltergeist::Driver.new(app, js_errors: false, timeout: 90)
+ Capybara::Poltergeist::Driver.new(app, js_errors: false, timeout: timeout)
end
Spinach.hooks.on_tag("javascript") do
Capybara.current_driver = Capybara.javascript_driver
end
-Capybara.default_wait_time = 60
+Capybara.default_wait_time = timeout
Capybara.ignore_hidden_elements = false
require 'capybara-screenshot/spinach'