Skip to content

Commit 1f73248

Browse files
committed
[rb] fix failing specs for linter & Safari
1 parent f95a16d commit 1f73248

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

rb/lib/selenium/webdriver/remote/capabilities.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def firefox(opts = {})
102102

103103
def safari(opts = {})
104104
new({
105-
browser_name: Selenium::WebDriver::Safari.technology_preview? ? "Safari Technology Preview" : 'safari',
105+
browser_name: Selenium::WebDriver::Safari.technology_preview? ? "Safari Technology Preview" : 'safari'
106106
}.merge(opts))
107107
end
108108

rb/spec/integration/selenium/webdriver/action_builder_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,8 @@ module WebDriver
159159
expect(element.attribute(:value)).to eq('ContextClicked')
160160
end
161161

162-
it 'can release pressed buttons via release action', except: [{browser: :safari},
163-
{driver: :remote, browser: :ie}],
164-
only: {browser: %i[edge chrome firefox ie]} do
162+
it 'can release pressed buttons via release action', except: [{browser: %i[safari safari_preview]},
163+
{driver: :remote, browser: :ie}] do
165164
driver.navigate.to url_for('javascriptPage.html')
166165

167166
event_input = driver.find_element(id: 'clickField')

rb/spec/integration/selenium/webdriver/devtools_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
module Selenium
2323
module WebDriver
24-
describe DevTools, only: {driver: %i[chrome edge]} do
24+
describe DevTools, exclusive: {driver: %i[chrome edge]} do
2525
let(:username) { SpecSupport::RackServer::TestApp::BASIC_AUTH_CREDENTIALS.first }
2626
let(:password) { SpecSupport::RackServer::TestApp::BASIC_AUTH_CREDENTIALS.last }
2727

rb/spec/integration/selenium/webdriver/manager_spec.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module WebDriver
8484
it 'should not allow domain to be set for localhost',
8585
except: [{browser: %i[chrome edge],
8686
reason: "https://bugs.chromium.org/p/chromedriver/issues/detail?id=3733"},
87-
{browser: %i[safari safari_preview]}] do
87+
{browser: %i[safari safari_preview]}] do
8888
expect {
8989
driver.manage.add_cookie name: 'domain',
9090
value: 'localhost',
@@ -94,8 +94,8 @@ module WebDriver
9494

9595
it 'should not allow setting on a different domain',
9696
except: [{browser: %i[chrome edge],
97-
reason: "https://bugs.chromium.org/p/chromedriver/issues/detail?id=3733"},
98-
{browser: %i[safari safari_preview]}] do
97+
reason: "https://bugs.chromium.org/p/chromedriver/issues/detail?id=3733"},
98+
{browser: %i[safari safari_preview]}] do
9999
expect {
100100
driver.manage.add_cookie name: 'domain',
101101
value: 'different',
@@ -179,9 +179,8 @@ module WebDriver
179179

180180
it 'should not allow adding with value None when secure is false',
181181
except: [{browser: :firefox,
182-
reason: "https://github.com/mozilla/geckodriver/issues/1842"},
182+
reason: "https://github.com/mozilla/geckodriver/issues/1842"},
183183
{browser: %i[safari safari_preview]}] do
184-
185184
expect {
186185
driver.manage.add_cookie name: 'samesite',
187186
value: 'none-insecure',

rb/spec/integration/selenium/webdriver/window_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ module WebDriver
120120
# https://github.com/mozilla/geckodriver/issues/1281
121121
it 'can make window full screen', only: {window_manager: true},
122122
exclude: [{driver: :remote, browser: :firefox, platform: :linux},
123+
{driver: :remote, browser: :safari},
123124
{browser: %i[chrome edge]}] do
124125
window.size = old_size = Dimension.new(700, 700)
125126

0 commit comments

Comments
 (0)