aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/system_testing
diff options
context:
space:
mode:
authorEileen M. Uchitelle <eileencodes@users.noreply.github.com>2017-12-07 14:44:05 -0500
committerGitHub <noreply@github.com>2017-12-07 14:44:05 -0500
commite8c3b58cb6e1dd204dd586f1cf6c3e482fb80abe (patch)
tree67bd58d296bb59a9fa8d8cf285a753bf9c066589 /actionpack/lib/action_dispatch/system_testing
parent6a8ce7416d6615a13ee5c4b9f6bcd91cc5adef4d (diff)
parent82b974813b28748e5affcff1d8c4ad60ab2971be (diff)
downloadrails-e8c3b58cb6e1dd204dd586f1cf6c3e482fb80abe.tar.gz
rails-e8c3b58cb6e1dd204dd586f1cf6c3e482fb80abe.tar.bz2
rails-e8c3b58cb6e1dd204dd586f1cf6c3e482fb80abe.zip
Merge pull request #31365 from bogdanvlviv/add-headless_firefox-driver-to-system_tests
Add headless firefox driver to System Tests
Diffstat (limited to 'actionpack/lib/action_dispatch/system_testing')
-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)