Commit 1e66f35c authored by Robert Speicher's avatar Robert Speicher

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.
parent eff24047
...@@ -6,7 +6,15 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 15 ...@@ -6,7 +6,15 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 15
Capybara.javascript_driver = :poltergeist Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app| 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 end
Capybara.default_max_wait_time = timeout Capybara.default_max_wait_time = timeout
......
...@@ -7,7 +7,15 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 10 ...@@ -7,7 +7,15 @@ timeout = (ENV['CI'] || ENV['CI_SERVER']) ? 90 : 10
Capybara.javascript_driver = :poltergeist Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app| 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 end
Capybara.default_max_wait_time = timeout 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