diff options
author | Rémy Coutable <remy@rymai.me> | 2016-11-28 11:37:21 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-11-28 11:37:21 +0000 |
commit | 13c0039891fb33a6f3cf88e9c62e1d493a5f75da (patch) | |
tree | 1f639034a193573dff785f7c2a4586238caf44ed | |
parent | 6ea0b8d56322108788727a2f4ad27843013d43f1 (diff) | |
parent | 1e66f35c560b5a0067851cabb792fe23281cfd51 (diff) | |
download | gitlab-ce-13c0039891fb33a6f3cf88e9c62e1d493a5f75da.tar.gz |
Merge branch 'rs-phantomjs-disable-images' into 'master'
Pass `--load-images=no` to PhantomJS via Capybara/Poltergeist
We were unintentionally hitting `gravatar.com` whenever a test that used
Poltergeist was run. This was certainly wasting their resources and
slowing down our tests even further, for no reason.
Part of https://gitlab.com/gitlab-org/gitlab-ce/issues/24899
See merge request !7781
-rw-r--r-- | features/support/capybara.rb | 10 | ||||
-rw-r--r-- | spec/support/capybara.rb | 10 |
2 files changed, 18 insertions, 2 deletions
diff --git a/features/support/capybara.rb b/features/support/capybara.rb index dae0d0f918c..47372df152d 100644 --- a/features/support/capybara.rb +++ b/features/support/capybara.rb @@ -6,7 +6,15 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 15 Capybara.javascript_driver = :poltergeist Capybara.register_driver :poltergeist do |app| - Capybara::Poltergeist::Driver.new(app, js_errors: true, timeout: timeout, window_size: [1366, 768]) + Capybara::Poltergeist::Driver.new( + app, + js_errors: true, + timeout: timeout, + window_size: [1366, 768], + phantomjs_options: [ + '--load-images=no' + ] + ) end Capybara.default_max_wait_time = timeout diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index e1f90e17cce..16d5f2bf0b8 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -7,7 +7,15 @@ 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: true, timeout: timeout, window_size: [1366, 768]) + Capybara::Poltergeist::Driver.new( + app, + js_errors: true, + timeout: timeout, + window_size: [1366, 768], + phantomjs_options: [ + '--load-images=no' + ] + ) end Capybara.default_max_wait_time = timeout |