Commit 13c00398 authored by Rémy Coutable's avatar Rémy Coutable

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
parents 6ea0b8d5 1e66f35c
......@@ -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
......
......@@ -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
......
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