aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/system_test_case.rb
diff options
context:
space:
mode:
authorEileen Uchitelle <eileencodes@gmail.com>2019-01-29 09:01:58 -0500
committerEileen Uchitelle <eileencodes@gmail.com>2019-01-29 11:55:30 -0500
commit1a4f61307286702205fd32b3aa62c26c21c9cce3 (patch)
treed9e6738fb7d6beb4e9a30791222076835b73f0d0 /actionpack/lib/action_dispatch/system_test_case.rb
parent5936bd9a201a2c1a3730d9c857f0908959505d2b (diff)
downloadrails-1a4f61307286702205fd32b3aa62c26c21c9cce3.tar.gz
rails-1a4f61307286702205fd32b3aa62c26c21c9cce3.tar.bz2
rails-1a4f61307286702205fd32b3aa62c26c21c9cce3.zip
Rename methods and update docs
This is a minor update to the named methods for the following: - s/desired_capabilities/capabilities - s/driver_options/capabilities Since they are all the same thing we should keep the name the same throughout the feature. Updated docs to match / be a little bit clearer Also updated the Gemfile for selenium-webdriver.
Diffstat (limited to 'actionpack/lib/action_dispatch/system_test_case.rb')
-rw-r--r--actionpack/lib/action_dispatch/system_test_case.rb20
1 files changed, 12 insertions, 8 deletions
diff --git a/actionpack/lib/action_dispatch/system_test_case.rb b/actionpack/lib/action_dispatch/system_test_case.rb
index 644c703dc9..484eb46331 100644
--- a/actionpack/lib/action_dispatch/system_test_case.rb
+++ b/actionpack/lib/action_dispatch/system_test_case.rb
@@ -89,12 +89,16 @@ module ActionDispatch
# { js_errors: true }
# end
#
- # Most drivers won't let you add specific browser capabilities through the +options+ mentioned above.
- # 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 capabilities to it.
- # To make things easier, `driven_by` can be called with a block.
- # The block will be passed an instance of `<Driver>::Options` where you can define the capabilities you want.
- # Please refer to your driver documentation to learn about supported options.
+ # Some drivers require browser capabilities to be passed as a block instead
+ # 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
+ # capabilities with a block.
+ #
+ # The block will be passed an instance of `<Driver>::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|
@@ -148,10 +152,10 @@ module ActionDispatch
# driven_by :selenium, using: :firefox
#
# driven_by :selenium, using: :headless_firefox
- def self.driven_by(driver, using: :chrome, screen_size: [1400, 1400], options: {}, &desired_capabilities)
+ def self.driven_by(driver, using: :chrome, screen_size: [1400, 1400], options: {}, &capabilities)
driver_options = { using: using, screen_size: screen_size, options: options }
- self.driver = SystemTesting::Driver.new(driver, driver_options, &desired_capabilities)
+ self.driver = SystemTesting::Driver.new(driver, driver_options, &capabilities)
end
driven_by :selenium