aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/system_testing/driver.rb
diff options
context:
space:
mode:
authorJeffrey Guenther <guenther.jeffrey@gmail.com>2017-12-08 13:25:54 -0800
committerJeffrey Guenther <guenther.jeffrey@gmail.com>2017-12-08 13:25:54 -0800
commita822287cefc38b9b8b3be38ffd775cd3d511b7c3 (patch)
treed69c6ea1fcc4299caa11bcbef2ce5520347a4f46 /actionpack/lib/action_dispatch/system_testing/driver.rb
parent08fab27db52aa375df85a23e89799600f785b9d4 (diff)
parentda8e0ba03cbae33857954c0c1a228bd6dae562da (diff)
downloadrails-a822287cefc38b9b8b3be38ffd775cd3d511b7c3.tar.gz
rails-a822287cefc38b9b8b3be38ffd775cd3d511b7c3.tar.bz2
rails-a822287cefc38b9b8b3be38ffd775cd3d511b7c3.zip
Merge branch 'master' into activestorage-guide
Diffstat (limited to 'actionpack/lib/action_dispatch/system_testing/driver.rb')
-rw-r--r--actionpack/lib/action_dispatch/system_testing/driver.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/driver.rb b/actionpack/lib/action_dispatch/system_testing/driver.rb
index 2687772b4b..280989a146 100644
--- a/actionpack/lib/action_dispatch/system_testing/driver.rb
+++ b/actionpack/lib/action_dispatch/system_testing/driver.rb
@@ -38,13 +38,24 @@ module ActionDispatch
browser_options.args << "--disable-gpu"
@options.merge(options: browser_options)
+ elsif @browser == :headless_firefox
+ browser_options = Selenium::WebDriver::Firefox::Options.new
+ browser_options.args << "-headless"
+
+ @options.merge(options: browser_options)
else
@options
end
end
def browser
- @browser == :headless_chrome ? :chrome : @browser
+ if @browser == :headless_chrome
+ :chrome
+ elsif @browser == :headless_firefox
+ :firefox
+ else
+ @browser
+ end
end
def register_selenium(app)