summaryrefslogtreecommitdiff
path: root/features/support
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2016-11-28 16:50:08 +0800
committerRobert Speicher <rspeicher@gmail.com>2016-11-28 16:50:08 +0800
commit1e66f35c560b5a0067851cabb792fe23281cfd51 (patch)
tree0dd8d02efa404d3ab16f8da56a0e5ef676d05943 /features/support
parenteff2404785f58241f947bd7388564f49119d517d (diff)
downloadgitlab-ce-1e66f35c560b5a0067851cabb792fe23281cfd51.tar.gz
Pass `--load-images=no` to PhantomJS via Capybara/Poltergeistrs-phantomjs-disable-images
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.
Diffstat (limited to 'features/support')
-rw-r--r--features/support/capybara.rb10
1 files changed, 9 insertions, 1 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