diff options
author | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-12-07 20:02:34 +0200 |
---|---|---|
committer | bogdanvlviv <bogdanvlviv@gmail.com> | 2017-12-07 20:20:54 +0200 |
commit | 82b974813b28748e5affcff1d8c4ad60ab2971be (patch) | |
tree | 083dedbde855620fce7fa67c947c3129dff6439a /actionpack/lib/action_dispatch/system_testing | |
parent | bbacd60048a8efa1777a01292a9392e146a7d885 (diff) | |
download | rails-82b974813b28748e5affcff1d8c4ad60ab2971be.tar.gz rails-82b974813b28748e5affcff1d8c4ad60ab2971be.tar.bz2 rails-82b974813b28748e5affcff1d8c4ad60ab2971be.zip |
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.rb | 13 |
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) |