Skip to content

Commit

Permalink
[rb] guard tests for BiDi browsing context
Browse files Browse the repository at this point in the history
  • Loading branch information
titusfortner committed Feb 6, 2023
1 parent 7e8d9d2 commit 80e7446
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,28 +32,29 @@ class BiDi
expect(browsing_context.id).to eq(id)
end

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

it 'can create a window with a reference context' do
it 'can create a window with a reference context', except: {browser: :chrome} 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' do
it 'can create a tab with a reference context', except: {browser: :chrome} do
browsing_context = described_class.new(driver: driver, type: :tab, reference_context: driver.window_handle)
expect(browsing_context.id).not_to be_nil
end

it 'can navigate to a url', except: {browser: :chrome, reason: 'navigation_id is not nil'} do
it 'can navigate to a url without a readiness state',
except: {browser: :chrome, reason: 'navigation_id is not nil'} do
browsing_context = described_class.new(driver: driver, type: :tab)

info = browsing_context.navigate url: url_for('/bidi/logEntryAdded.html')
Expand Down

0 comments on commit 80e7446

Please sign in to comment.