diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/system_testing')
-rw-r--r-- | actionpack/lib/action_dispatch/system_testing/browser.rb | 12 | ||||
-rw-r--r-- | actionpack/lib/action_dispatch/system_testing/driver.rb | 10 |
2 files changed, 11 insertions, 11 deletions
diff --git a/actionpack/lib/action_dispatch/system_testing/browser.rb b/actionpack/lib/action_dispatch/system_testing/browser.rb index 74585062aa..f691bd5fe5 100644 --- a/actionpack/lib/action_dispatch/system_testing/browser.rb +++ b/actionpack/lib/action_dispatch/system_testing/browser.rb @@ -29,7 +29,7 @@ module ActionDispatch end end - def driver_options + def capabilities @option ||= case type when :chrome Selenium::WebDriver::Chrome::Options.new @@ -40,16 +40,16 @@ module ActionDispatch private def headless_chrome_browser_options - driver_option.args << "--headless" - driver_option.args << "--disable-gpu" if Gem.win_platform? + capability.args << "--headless" + capability.args << "--disable-gpu" if Gem.win_platform? - driver_options + capabilities end def headless_firefox_browser_options - driver_options.args << "-headless" + capabilities.args << "-headless" - driver_options + capabilities end end end diff --git a/actionpack/lib/action_dispatch/system_testing/driver.rb b/actionpack/lib/action_dispatch/system_testing/driver.rb index f71736833c..25a09dd918 100644 --- a/actionpack/lib/action_dispatch/system_testing/driver.rb +++ b/actionpack/lib/action_dispatch/system_testing/driver.rb @@ -3,12 +3,12 @@ module ActionDispatch module SystemTesting class Driver # :nodoc: - def initialize(name, **options, &desired_capabilities) + def initialize(name, **options, &capabilities) @name = name @browser = Browser.new(options[:using]) @screen_size = options[:screen_size] @options = options[:options] - @desired_capabilities = desired_capabilities + @capabilities = capabilities end def use @@ -23,7 +23,7 @@ module ActionDispatch end def register - define_browser_capabilities(@browser.driver_options) + define_browser_capabilities(@browser.capabilities) Capybara.register_driver @name do |app| case @name @@ -34,8 +34,8 @@ module ActionDispatch end end - def define_browser_capabilities(driver_options) - @desired_capabilities.call(driver_options) if @desired_capabilities + def define_browser_capabilities(capabilities) + @capabilities.call(capabilities) if @capabilities end def browser_options |