require 'capybara/poltergeist'

Capybara.javascript_driver = :poltergeist
Capybara.default_max_wait_time = 20

require 'capybara/poltergeist'

Capybara.register_driver :poltergeist do |app|
  Capybara::Poltergeist::Driver.new(app, url_whitelist: %w(127.0.0.1))
end

Capybara.javascript_driver = :poltergeist
Capybara.default_max_wait_time = 20

Whitelist local assets only during JS tests
Whitelist local assets only during JS tests

This stops our tests loading remote assets, speeding up the tests
generally but also silencing the stupid console output from smart
survey's scripts.
