From eb1fc14d15c53de1c17534c958ddd588c913e203 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Fri, 1 Feb 2019 16:07:41 +0900 Subject: Fix doc of `ActionDispatch::SystemTestCase` [ci skip] * Fix broken format. * Need to specify driver to the first argument of `driven_by`. * `add_emulation` doesn't have `device` keyword. Ref: https://github.com/SeleniumHQ/selenium/blob/master/rb/lib/selenium/webdriver/chrome/options.rb#L142-L162 --- actionpack/lib/action_dispatch/system_test_case.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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 484eb46331..066daa4a12 100644 --- a/actionpack/lib/action_dispatch/system_test_case.rb +++ b/actionpack/lib/action_dispatch/system_test_case.rb @@ -93,19 +93,19 @@ module ActionDispatch # of through the +options+ hash. # # As an example, if you want to add mobile emulation on chrome, you'll have to - # create an instance of selenium's `Chrome::Options` object and add + # create an instance of selenium's +Chrome::Options+ object and add # capabilities with a block. # - # The block will be passed an instance of `::Options` where you can + # The block will be passed an instance of ::Options where you can # define the capabilities you want. Please refer to your driver documentation # to learn about supported options. # - # class ApplicationSystemTestCase < ActionDispatch::SystemTestCase - # driven_by :chrome, screen_size: [1024, 768] do |driver_option| - # driver_option.add_emulation(device: 'iPhone 6') - # driver_option.add_extension('path/to/chrome_extension.crx') + # class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + # driven_by :selenium, using: :chrome, screen_size: [1024, 768] do |driver_option| + # driver_option.add_emulation(device_name: 'iPhone 6') + # driver_option.add_extension('path/to/chrome_extension.crx') + # end # end - # end # # Because ActionDispatch::SystemTestCase is a shim between Capybara # and Rails, any driver that is supported by Capybara is supported by system -- cgit v1.2.3