-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
Open
Labels
Description
Feature and motivation
Is there Ruby 3.4 support planned any time soon? The official release should be out in just two days
Usage example
Observing test failures such as:
1) Selenium::WebDriver::Chrome::Options#as_json errors when unrecognized capability is passed
Failure/Error:
expect {
options.as_json
}.to raise_error(Error::WebDriverError, 'These options are not w3c compliant: {:foo=>"bar"}')
expected Selenium::WebDriver::Error::WebDriverError with "These options are not w3c compliant: {:foo=>\"bar\"}", got #<Selenium::WebDriver::Error::WebDriverError: These options are not w3c compliant: {foo: "bar"}> with backtrace:
# ./lib/selenium/webdriver/common/options.rb:118:in 'Selenium::WebDriver::Options#as_json'
# ./spec/unit/selenium/webdriver/chrome/options_spec.rb:249:in 'block (4 levels) in <module:Chrome>'
# ./spec/unit/selenium/webdriver/chrome/options_spec.rb:250:in 'block (3 levels) in <module:Chrome>'
# /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'
# ./spec/unit/selenium/webdriver/chrome/options_spec.rb:250:in 'block (3 levels) in <module:Chrome>'
# /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'
2) Selenium::WebDriver::Edge::Options#as_json errors when unrecognized capability is passed
Failure/Error:
expect {
options.as_json
}.to raise_error(Error::WebDriverError, 'These options are not w3c compliant: {:foo=>"bar"}')
expected Selenium::WebDriver::Error::WebDriverError with "These options are not w3c compliant: {:foo=>\"bar\"}", got #<Selenium::WebDriver::Error::WebDriverError: These options are not w3c compliant: {foo: "bar"}> with backtrace:
# ./lib/selenium/webdriver/common/options.rb:118:in 'Selenium::WebDriver::Options#as_json'
# ./spec/unit/selenium/webdriver/edge/options_spec.rb:211:in 'block (4 levels) in <module:Edge>'
# ./spec/unit/selenium/webdriver/edge/options_spec.rb:212:in 'block (3 levels) in <module:Edge>'
# /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'
# ./spec/unit/selenium/webdriver/edge/options_spec.rb:212:in 'block (3 levels) in <module:Edge>'
# /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'
3) Selenium::WebDriver::Support::Guards#disposition is pending without provided reason
Failure/Error:
expect(guards.disposition).to eq [:pending,
'Test guarded; Guarded by {:foo=>false, :reason=>"No reason given"};']
expected: [:pending, "Test guarded; Guarded by {:foo=>false, :reason=>\"No reason given\"};"]
got: [:pending, "Test guarded; Guarded by {foo: false, reason: \"No reason given\"};"]
(compared using ==)
Diff:
@@ -1,3 +1,3 @@
[:pending,
- "Test guarded; Guarded by {:foo=>false, :reason=>\"No reason given\"};"]
+ "Test guarded; Guarded by {foo: false, reason: \"No reason given\"};"]
# ./spec/unit/selenium/webdriver/guard_spec.rb:80:in 'block (3 levels) in <module:Support>'
# /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'
4) Selenium::WebDriver::Support::Guards#disposition is skipped without provided reason
Failure/Error: expect(guards.disposition).to eq [:skip, message]
expected: [:skip, "Test does not apply to this configuration; Guarded by {:foo=>true, :reason=>\"No reason given\"};"]
got: [:skip, "Test does not apply to this configuration; Guarded by {foo: true, reason: \"No reason given\"};"]
(compared using ==)
Diff:
@@ -1,3 +1,3 @@
[:skip,
- "Test does not apply to this configuration; Guarded by {:foo=>true, :reason=>\"No reason given\"};"]
+ "Test does not apply to this configuration; Guarded by {foo: true, reason: \"No reason given\"};"]
# ./spec/unit/selenium/webdriver/guard_spec.rb:89:in 'block (3 levels) in <module:Support>'
# /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'
5) Selenium::WebDriver::Support::Guards::Guard#message defaults to no reason given
Failure/Error: expect(guard.message).to eq('Test guarded; Guarded by {:reason=>"No reason given"};')
expected: "Test guarded; Guarded by {:reason=>\"No reason given\"};"
got: "Test guarded; Guarded by {reason: \"No reason given\"};"
(compared using ==)
# ./spec/unit/selenium/webdriver/guard_spec.rb:161:in 'block (3 levels) in <module:Support>'
# /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'
6) Selenium::WebDriver::Support::Guards::Guard#message accepts String
Failure/Error: expect(guard.message).to eq('Test guarded; Guarded by {:reason=>"because"};')
expected: "Test guarded; Guarded by {:reason=>\"because\"};"
got: "Test guarded; Guarded by {reason: \"because\"};"
(compared using ==)
# ./spec/unit/selenium/webdriver/guard_spec.rb:174:in 'block (3 levels) in <module:Support>'
# /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'
7) Selenium::WebDriver::Support::Guards::Guard#message has special message for exclude
Failure/Error: expect(guard.message).to eq('Test skipped because it breaks test run; Guarded by {:reason=>"because"};')
expected: "Test skipped because it breaks test run; Guarded by {:reason=>\"because\"};"
got: "Test skipped because it breaks test run; Guarded by {reason: \"because\"};"
(compared using ==)
# ./spec/unit/selenium/webdriver/guard_spec.rb:194:in 'block (3 levels) in <module:Support>'
# /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'
8) Selenium::WebDriver::Support::Guards::Guard#message has special message for flaky
Failure/Error: expect(guard.message).to eq(msg)
expected: "Test skipped because it is unreliable in this configuration; Guarded by {:reason=>\"because\"};"
got: "Test skipped because it is unreliable in this configuration; Guarded by {reason: \"because\"};"
(compared using ==)
# ./spec/unit/selenium/webdriver/guard_spec.rb:201:in 'block (3 levels) in <module:Support>'
# /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'
9) Selenium::WebDriver::Support::Guards::Guard#message has special message for exclusive
Failure/Error: expect(guard.message).to eq('Test does not apply to this configuration; Guarded by {:reason=>"because"};')
expected: "Test does not apply to this configuration; Guarded by {:reason=>\"because\"};"
got: "Test does not apply to this configuration; Guarded by {reason: \"because\"};"
(compared using ==)
# ./spec/unit/selenium/webdriver/guard_spec.rb:207:in 'block (3 levels) in <module:Support>'
# /usr/share/gems/gems/webmock-3.23.1/lib/webmock/rspec.rb:39:in 'block (2 levels) in <top (required)>'
These seems to be caused by Hash#inspect
formatting change:
https://bugs.ruby-lang.org/issues/20433
I'd contributed the fixes, but I can't sign the CLA 🤷
lavaturtle, woodhull, ksweetie and nodeg