2 require "capybara/poltergeist"
4 # Work around weird debian/ubuntu phantomjs
5 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817277
6 # https://github.com/ariya/phantomjs/issues/14376
7 ENV["QT_QPA_PLATFORM"] = "phantom" if IO.popen(["phantomjs", "--version"], :err => :close).read.empty?
9 ActiveSupport.on_load(:action_dispatch_system_test_case) do
10 ActionDispatch::SystemTesting::Server.silence_puma = true
13 class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
14 driven_by :poltergeist, :screen_size => [1400, 1400], :options => { :timeout => 120 }
16 # Phantomjs can pick up browser Accept-Language preferences from your desktop environment.
17 # We don't want this to happen during the tests!
19 page.driver.add_headers("Accept-Language" => "en")