Set QT_QPA_PLATFORM to offscreen in the test environment

Works around an issue with the weird way the debian/ubuntu
version of phantomjs is built:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817277
https://github.com/ariya/phantomjs/issues/14376
This commit is contained in:
Tom Hughes 2018-05-31 22:46:45 +01:00
parent 33a532bddf
commit 41326fd6d4

View file

@ -3,6 +3,11 @@ require "capybara/poltergeist"
WebMock.disable_net_connect!(:allow_localhost => true)
# Work around weird debian/ubuntu phantomjs
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=817277
# https://github.com/ariya/phantomjs/issues/14376
ENV["QT_QPA_PLATFORM"] = "offscreen"
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
ActionDispatch::SystemTesting::Server.silence_puma = true