diff --git a/features/support/capybara.rb b/features/support/capybara.rb index c0c489d277508cc4b7af81166583b77e0a747ff0..456ec4deaf5ce1915197a5996f6ab5a7e926ba55 100644 --- a/features/support/capybara.rb +++ b/features/support/capybara.rb @@ -3,7 +3,7 @@ require 'capybara-screenshot/spinach' # Give CI some extra time -timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 30 : 10 +timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 40 : 10 Capybara.javascript_driver = :poltergeist Capybara.register_driver :poltergeist do |app| diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index aa14709bc9c57440e7de621caf252cae7538966c..cebc972be7ed8ef59e5ebf54c9b505db4548f5ea 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -4,7 +4,7 @@ require 'capybara-screenshot/rspec' # Give CI some extra time -timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 30 : 10 +timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 40 : 10 Capybara.javascript_driver = :poltergeist Capybara.register_driver :poltergeist do |app| @@ -27,6 +27,6 @@ RSpec.configure do |config| config.before(:suite) do - TestEnv.warm_asset_cache + TestEnv.warm_asset_cache unless ENV['CI'] || ENV['CI_SERVER'] end end diff --git a/spec/support/test_env.rb b/spec/support/test_env.rb index 78be23bd85386a6e73429b188f3e9195b3731c4c..b63df38187c296002837e23292a80ac5b6a0597c 100644 --- a/spec/support/test_env.rb +++ b/spec/support/test_env.rb @@ -170,17 +170,11 @@ def copy_forked_repo_with_submodules(project) # Otherwise they'd be created by the first test, often timing out and # causing a transient test failure def warm_asset_cache - return if warm_asset_cache? return unless defined?(Capybara) Capybara.current_session.driver.visit '/' end - def warm_asset_cache? - cache = Rails.root.join(*%w(tmp cache assets test)) - Dir.exist?(cache) && Dir.entries(cache).length > 2 - end - private def factory_repo_path