diff options
author | Mario Alberto Chávez <mario.chavez@gmail.com> | 2017-06-01 14:58:42 -0500 |
---|---|---|
committer | Mario Alberto Chávez <mario.chavez@gmail.com> | 2017-06-02 11:24:55 -0500 |
commit | 9063007538ffdfb03d35c7bb75218dfd2ddfc56c (patch) | |
tree | d6919cdc795ab62fa20e6ec4b1423979e8ca5cfa /actionpack/lib/action_dispatch/system_test_case.rb | |
parent | b97e7f02375d4e27286a29d081914bfd1dac3bdf (diff) | |
download | rails-9063007538ffdfb03d35c7bb75218dfd2ddfc56c.tar.gz rails-9063007538ffdfb03d35c7bb75218dfd2ddfc56c.tar.bz2 rails-9063007538ffdfb03d35c7bb75218dfd2ddfc56c.zip |
SystemTesting::Driver can register capybara-webkit and poltergeist
drivers.
When using `driver_by` with capybara-webkit or poltergeist,
SystemTesting::Driver will register the driver while passing
`screen_size` and `options` parameteres.
`options` could contain any option supported by the underlying driver.
Diffstat (limited to 'actionpack/lib/action_dispatch/system_test_case.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/system_test_case.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/system_test_case.rb b/actionpack/lib/action_dispatch/system_test_case.rb index 98fdb36c91..723d912bcd 100644 --- a/actionpack/lib/action_dispatch/system_test_case.rb +++ b/actionpack/lib/action_dispatch/system_test_case.rb @@ -67,13 +67,17 @@ module ActionDispatch # To use a headless driver, like Poltergeist, update your Gemfile to use # Poltergeist instead of Selenium and then declare the driver name in the # +application_system_test_case.rb+ file. In this case you would leave out the +:using+ - # option because the driver is headless. + # option because the driver is headless, but you can still use + # +:screen_size+ to change the size of the browser screen, also you can use + # +:options+ to pass options supported by the driver. Please refeer to your + # driver documentation to learn about supported options. # # require "test_helper" # require "capybara/poltergeist" # # class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - # driven_by :poltergeist + # driven_by :poltergeist, screen_size: [1400, 1400], options: + # { js_errors: true } # end # # Because <tt>ActionDispatch::SystemTestCase</tt> is a shim between Capybara |