Skip to content

Commit e984b30

Browse files
committed
[rb] quit driver at the end of bidi tests
1 parent fa31527 commit e984b30

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

rb/spec/integration/selenium/webdriver/bidi/browsing_context_spec.rb

+2-4
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ module Selenium
2323
module WebDriver
2424
class BiDi
2525
describe BrowsingContext, exclusive: {browser: %i[chrome firefox]} do
26-
before do
27-
quit_driver
28-
create_driver!(web_socket_url: true)
29-
end
26+
before { reset_driver!(web_socket_url: true) }
27+
after { quit_driver }
3028

3129
it 'can create a browsing context for given id' do
3230
id = driver.window_handle

rb/spec/integration/selenium/webdriver/bidi_spec.rb

+4-6
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,17 @@
2121

2222
module Selenium
2323
module WebDriver
24-
describe BiDi, exclusive: {browser: %i[chrome firefox]} do
25-
before do
26-
quit_driver
27-
create_driver!(web_socket_url: true)
28-
end
24+
describe BiDi, only: {browser: %i[chrome edge firefox]} do
25+
before { reset_driver!(web_socket_url: true) }
26+
after { quit_driver }
2927

3028
it 'gets session status' do
3129
status = driver.bidi.session.status
3230
expect(status).to respond_to(:ready)
3331
expect(status.message).not_to be_empty
3432
end
3533

36-
it 'can navigate and listen to errors' do
34+
it 'can navigate and listen to errors', except: {browser: :chrome, reason: 'not yet implemented'} do
3735
log_entry = nil
3836
log_inspector = BiDi::LogInspector.new(driver)
3937
log_inspector.on_javascript_exception { |log| log_entry = log }

0 commit comments

Comments
 (0)