Skip to content

Commit

Permalink
[rb] update guards to get tests passing
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed May 6, 2023
1 parent 1cd84f7 commit eec4236
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion rb/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,4 @@ DEPENDENCIES
yard (~> 0.9.11)

BUNDLED WITH
2.2.33
2.2.34
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,22 @@ class BiDi
expect(browsing_context.id).not_to be_nil
end

it 'can create a window with a reference context', except: {browser: %i[chrome edge]} do
it 'can create a window with a reference context', except: [{browser: :chrome,
platform: %i[linux macosx]},
{browser: :edge}] do
browsing_context = described_class.new(driver: driver, type: :window,
reference_context: driver.window_handle)
expect(browsing_context.id).not_to be_nil
end

it 'can create a tab' do
it 'can create a tab without a reference context' do
browsing_context = described_class.new(driver: driver, type: :tab)
expect(browsing_context.id).not_to be_nil
end

it 'can create a tab with a reference context', except: {browser: %i[chrome edge]} do
it 'can create a tab with a reference context', except: [{browser: :chrome,
platform: %i[linux macosx]},
{browser: :edge}] do
browsing_context = described_class.new(driver: driver, type: :tab, reference_context: driver.window_handle)
expect(browsing_context.id).not_to be_nil
end
Expand Down
8 changes: 0 additions & 8 deletions rb/spec/integration/selenium/webdriver/manager_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ module WebDriver
expect(driver.manage.cookie_named('domain')[:domain]).to eq('.saucelabs.com')
end

it 'does not allow domain to be set for localhost', except: {browser: %i[safari safari_preview]} do
expect {
driver.manage.add_cookie name: 'domain',
value: 'localhost',
domain: 'localhost'
}.to raise_error(Error::UnableToSetCookieError)
end

it 'does not allow setting on a different domain', except: {browser: %i[safari safari_preview]} do
expect {
driver.manage.add_cookie name: 'domain',
Expand Down

0 comments on commit eec4236

Please sign in to comment.