Commit 1e3fc84c authored by Robert Speicher's avatar Robert Speicher

Reduce timeout for non-CI features

parent 55831a4d
require 'spinach/capybara' require 'spinach/capybara'
require 'capybara/poltergeist' require 'capybara/poltergeist'
# Give CI some extra time
timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 10
Capybara.javascript_driver = :poltergeist Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app| 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 end
Spinach.hooks.on_tag("javascript") do Spinach.hooks.on_tag("javascript") do
Capybara.current_driver = Capybara.javascript_driver Capybara.current_driver = Capybara.javascript_driver
end end
Capybara.default_wait_time = 60 Capybara.default_wait_time = timeout
Capybara.ignore_hidden_elements = false Capybara.ignore_hidden_elements = false
require 'capybara-screenshot/spinach' require 'capybara-screenshot/spinach'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment