From 9063007538ffdfb03d35c7bb75218dfd2ddfc56c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20Alberto=20Ch=C3=A1vez?= Date: Thu, 1 Jun 2017 14:58:42 -0500 Subject: 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. --- actionpack/lib/action_dispatch/system_test_case.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'actionpack/lib/action_dispatch/system_test_case.rb') 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 ActionDispatch::SystemTestCase is a shim between Capybara -- cgit v1.2.3