Commit f659c406 authored by Rémy Coutable's avatar Rémy Coutable

Eager-load the Capybara server to prevent timeouts

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent e559283c
......@@ -25,5 +25,5 @@ Capybara.ignore_hidden_elements = false
Capybara::Screenshot.prune_strategy = :keep_last_run
Spinach.hooks.before_run do
TestEnv.warm_asset_cache unless ENV['CI'] || ENV['CI_SERVER']
TestEnv.eager_load_driver_server
end
......@@ -27,6 +27,6 @@ Capybara::Screenshot.prune_strategy = :keep_last_run
RSpec.configure do |config|
config.before(:suite) do
TestEnv.warm_asset_cache unless ENV['CI'] || ENV['CI_SERVER']
TestEnv.eager_load_driver_server
end
end
......@@ -169,7 +169,7 @@ module TestEnv
#
# Otherwise they'd be created by the first test, often timing out and
# causing a transient test failure
def warm_asset_cache
def eager_load_driver_server
return unless defined?(Capybara)
Capybara.current_session.driver.visit '/'
......
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