Skip to content

[rb] Use rbs trace #15686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8c317d8
[build] allow tests tagged exclusive-if-local to run on rbe
titusfortner Mar 22, 2025
bb29c66
merge trunk
aguspe Apr 2, 2025
5b6a0ce
Merge branch 'trunk' of github.com:aguspe/selenium into trunk
aguspe Apr 22, 2025
c9cb77c
Merge branch 'trunk' of github.com:aguspe/selenium into trunk
aguspe Apr 30, 2025
db643da
Implement RBS trace
aguspe Apr 30, 2025
289760c
Add RBS comments
aguspe May 2, 2025
5fe85cd
change platforms for rbs trace
aguspe May 2, 2025
3517eb6
Merge branch 'trunk' into use_rbs_trace
aguspe May 2, 2025
481434f
Fix trace load issue
aguspe May 5, 2025
3dd7632
Merge remote-tracking branch 'origin/use_rbs_trace' into use_rbs_trace
aguspe May 5, 2025
9d6dfd9
Merge branch 'trunk' into use_rbs_trace
aguspe May 5, 2025
68c1e73
remove trace from CI
aguspe May 5, 2025
c492ae7
Merge branch 'trunk' into use_rbs_trace
aguspe May 7, 2025
52bec69
Merge branch 'trunk' into use_rbs_trace
aguspe May 7, 2025
1ba4b0f
Merge branch 'trunk' into use_rbs_trace
aguspe May 11, 2025
cec3855
Try to use ci? method
aguspe May 12, 2025
7703edc
Merge remote-tracking branch 'origin/use_rbs_trace' into use_rbs_trace
aguspe May 12, 2025
5c7450b
Quit the driver after the trace setup
aguspe May 12, 2025
4f36c14
Merge branch 'trunk' into use_rbs_trace
aguspe May 12, 2025
257e6ed
Merge update
aguspe May 13, 2025
5deb1b6
Update comments
aguspe May 14, 2025
fdab631
Merge remote-tracking branch 'origin/use_rbs_trace' into use_rbs_trace
aguspe May 14, 2025
c531eb3
Merge branch 'trunk' into use_rbs_trace
aguspe May 14, 2025
1cc3512
Remove CI method
aguspe May 14, 2025
f878c80
Merge remote-tracking branch 'origin/use_rbs_trace' into use_rbs_trace
aguspe May 14, 2025
ec9781c
Merge branch 'trunk' into use_rbs_trace
aguspe May 16, 2025
8cadb71
Skip firefox test
aguspe May 17, 2025
4d12946
Merge remote-tracking branch 'origin/use_rbs_trace' into use_rbs_trace
aguspe May 17, 2025
97f1e59
Remove RBS comments
aguspe May 18, 2025
4012263
Fix linter issues
aguspe May 18, 2025
c6ac031
Fix formatting
aguspe May 18, 2025
152c5a2
Fix formatting
aguspe May 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Try to use ci? method
  • Loading branch information
aguspe committed May 12, 2025
commit cec3855bcd76c1a8a13dd031adeb2a338ac3d193
8 changes: 3 additions & 5 deletions rb/sig/lib/selenium/webdriver/remote/bridge.rbs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
class Selenium::WebDriver::Remote::Bridge
def execute: (Symbol, ?Hash[untyped, untyped], ?Hash[untyped, untyped]) -> nil
| (Symbol, ?Hash[untyped, untyped], ?nil) -> Hash[untyped, untyped]
| (Symbol, ?Hash[untyped, untyped], ?nil) -> nil
def quit: () -> nil

def session_id: () -> String
def execute: (Symbol, ?Hash[untyped, untyped], ?nil) -> void

def quit: () -> nil
def session_id: () -> String
end
3 changes: 1 addition & 2 deletions rb/sig/lib/selenium/webdriver/remote/http/common.rbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
class Selenium::WebDriver::Remote::Http::Common
def call: (Symbol, String, Hash[untyped, untyped]) -> Selenium::WebDriver::Remote::Response
| (Symbol, String, nil) -> Selenium::WebDriver::Remote::Response
def call: (Symbol, String, nil) -> Selenium::WebDriver::Remote::Response

def server_url: () -> URI::HTTP

Expand Down
11 changes: 3 additions & 8 deletions rb/sig/lib/selenium/webdriver/remote/http/default.rbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
class Selenium::WebDriver::Remote::Http::Default
def request: (Symbol, URI::HTTP, Hash[untyped, untyped], String, ?Integer) -> Selenium::WebDriver::Remote::Response
| (Symbol, URI::HTTP, Hash[untyped, untyped], nil, ?Integer) -> Selenium::WebDriver::Remote::Response
def request: (Symbol, URI::HTTP, Hash[untyped, untyped], nil, ?Integer) -> Selenium::WebDriver::Remote::Response

def new_request_for: (Symbol, URI::HTTP, Hash[untyped, untyped], String) -> Net::HTTP::Post
| (Symbol, URI::HTTP, Hash[untyped, untyped], nil) -> Net::HTTP::Get
| (Symbol, URI::HTTP, Hash[untyped, untyped], nil) -> Net::HTTP::Delete
def new_request_for: (Symbol, URI::HTTP, Hash[untyped, untyped], nil) -> Net::HTTP::Delete

def response_for: (Net::HTTP::Post) -> Net::HTTPOK
| (Net::HTTP::Get) -> Net::HTTPOK
| (Net::HTTP::Delete) -> Net::HTTPOK
def response_for: (Net::HTTP::Delete) -> Net::HTTPOK

def http: () -> Net::HTTP

Expand Down
2 changes: 0 additions & 2 deletions rb/sig/lib/selenium/webdriver/remote/response.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ class Selenium::WebDriver::Remote::Response
def error: () -> nil

def process_error: () -> nil
| () -> Array[untyped]

def []: (String) -> nil
| (String) -> Hash[untyped, untyped]
end
6 changes: 2 additions & 4 deletions rb/sig/lib/selenium/webdriver/support/guards.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ class Selenium::WebDriver::Support::Guards
| (Symbol, ?nil) -> void
| (Symbol, ?bool) -> void

def disposition: () -> nil
def disposition: () -> Array[untyped]

def skipping_guard: () -> nil
def skipping_guard: () -> Selenium::WebDriver::Support::Guards::Guard

def satisfied?: (Selenium::WebDriver::Support::Guards::Guard) -> bool

def pending_guard: () -> nil
end
6 changes: 1 addition & 5 deletions rb/sig/lib/selenium/webdriver/support/guards/guard.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,5 @@ class Selenium::WebDriver::Support::Guards::Guard

def exclusive?: () -> bool

def exclude?: () -> bool

def except?: () -> bool

def only?: () -> bool
def message: () -> String
end
2 changes: 1 addition & 1 deletion rb/spec/integration/selenium/webdriver/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def example_finished(notification)
module TraceHelper
# @rbs () -> RBS::Trace
def self.trace
@trace ||= if GlobalTestEnv.send(:current_env)[:ci].nil?
@trace ||= unless GlobalTestEnv.ci?
require 'rbs-trace'
RBS::Trace.new
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ def create_driver!(listener: nil, **opts, &block)
raise e
end

def ci?
current_env[:ci]
end

private

# @rbs (**Hash[untyped, untyped]) -> Selenium::WebDriver::Chrome::Options
Expand Down