Skip to content

Commit eae4809

Browse files
committed
Fix formatting issues
1 parent 3968265 commit eae4809

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

rb/lib/selenium/webdriver/bidi/browser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def create_user_context
2929
@bidi.send_cmd('browser.createUserContext')
3030
end
3131

32-
def get_user_contexts
32+
def user_contexts
3333
@bidi.send_cmd('browser.getUserContexts')
3434
end
3535

rb/lib/selenium/webdriver/common/manager.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ def cookie_named(name)
7979
#
8080

8181
def delete_cookie(name)
82+
raise ArgumentError, 'Cookie name cannot be null or empty' if name.nil? || name.strip.empty?
83+
8284
@bridge.delete_cookie name
8385
end
8486

rb/sig/lib/selenium/webdriver/bidi/browser.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module Selenium
88

99
def create_user_context: () -> Hash[String, String]
1010

11-
def get_user_contexts: () -> Array[Hash[String, String]]
11+
def user_contexts: () -> Array[Hash[String, String]]
1212

1313
def remove_user_context: (String user_context) -> Hash[nil, nil]
1414
end

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@ class BiDi
3737
reset_driver!(web_socket_url: true) do |driver|
3838
browser = described_class.new(driver.bidi)
3939
2.times { browser.create_user_context }
40-
expect(browser.get_user_contexts['userContexts'].count).to eq 3
40+
expect(browser.user_contexts['userContexts'].count).to eq 3
4141
end
4242
end
4343

4444
it 'removes an user context' do
4545
reset_driver!(web_socket_url: true) do |driver|
4646
browser = described_class.new(driver.bidi)
4747
user_context = browser.create_user_context
48-
expect(browser.get_user_contexts['userContexts'].count).to eq 2
48+
expect(browser.user_contexts['userContexts'].count).to eq 2
4949
browser.remove_user_context(user_context['userContext'])
50-
expect(browser.get_user_contexts['userContexts'].count).to eq 1
50+
expect(browser.user_contexts['userContexts'].count).to eq 1
5151
end
5252
end
5353

0 commit comments

Comments
 (0)