Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,13 +448,14 @@ Test targets:
| `bazel test //rb/spec/integration/... --test_tag_filters firefox-remote` | Run integration tests for remote Firefox only |
| `bazel test //rb/spec/integration/... --test_tag_filters bidi` | Run bidi-mode tests across every browser that supports BiDi |

Ruby test targets have the same name as the spec file with `_spec.rb` removed, so you can run them individually.
Integration test targets also have a browser-variant suffix to control which browser to pick and whether to use Grid or BiDi
(e.g. `-chrome`, `-chrome-remote`, `-chrome-beta-bidi`).
All unit specs run as a single target, `//rb/spec/unit:unit`.

Integration test targets have the same name as the spec file with `_spec.rb` removed, plus a
browser-variant suffix to control which browser to pick and whether to use Grid or BiDi
(e.g. `-chrome`, `-chrome-remote`, `-chrome-beta-bidi`), so you can run them individually.

| Test file | Test target |
| ------------------------------------------------------- | ---------------------------------------------------------------- |
| `rb/spec/unit/selenium/webdriver/proxy_spec.rb` | `//rb/spec/unit/selenium/webdriver:proxy` |
| `rb/spec/integration/selenium/webdriver/driver_spec.rb` | `//rb/spec/integration/selenium/webdriver:driver-chrome` |
| `rb/spec/integration/selenium/webdriver/driver_spec.rb` | `//rb/spec/integration/selenium/webdriver:driver-chrome-remote` |
| `rb/spec/integration/selenium/webdriver/driver_spec.rb` | `//rb/spec/integration/selenium/webdriver:driver-firefox` |
Expand Down
63 changes: 2 additions & 61 deletions rb/spec/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,67 +48,8 @@ rb_library(
"//rb/spec/integration/selenium/webdriver/remote:driver",
"//rb/spec/integration/selenium/webdriver/remote:element",
"//rb/spec/integration/selenium/webdriver/safari:driver",
"//rb/spec/unit/selenium:devtools",
"//rb/spec/unit/selenium:server",
"//rb/spec/unit/selenium/devtools:cdp_client_generator",
"//rb/spec/unit/selenium/webdriver:file_reaper",
"//rb/spec/unit/selenium/webdriver:guard",
"//rb/spec/unit/selenium/webdriver:proxy",
"//rb/spec/unit/selenium/webdriver:search_context",
"//rb/spec/unit/selenium/webdriver:socket_poller",
"//rb/spec/unit/selenium/webdriver:spec_helper",
"//rb/spec/unit/selenium/webdriver:wait",
"//rb/spec/unit/selenium/webdriver/chrome:driver",
"//rb/spec/unit/selenium/webdriver/chrome:options",
"//rb/spec/unit/selenium/webdriver/chrome:service",
"//rb/spec/unit/selenium/webdriver/common:action_builder",
"//rb/spec/unit/selenium/webdriver/common:credentials",
"//rb/spec/unit/selenium/webdriver/common:driver_finder",
"//rb/spec/unit/selenium/webdriver/common:logger",
"//rb/spec/unit/selenium/webdriver/common:selenium_manager",
"//rb/spec/unit/selenium/webdriver/common:service",
"//rb/spec/unit/selenium/webdriver/common:virtual_authenticator_options",
"//rb/spec/unit/selenium/webdriver/common/interactions",
"//rb/spec/unit/selenium/webdriver/common/interactions:input_device",
"//rb/spec/unit/selenium/webdriver/common/interactions:interaction",
"//rb/spec/unit/selenium/webdriver/common/interactions:key_actions",
"//rb/spec/unit/selenium/webdriver/common/interactions:key_input",
"//rb/spec/unit/selenium/webdriver/common/interactions:none_input",
"//rb/spec/unit/selenium/webdriver/common/interactions:pause",
"//rb/spec/unit/selenium/webdriver/common/interactions:pointer_actions",
"//rb/spec/unit/selenium/webdriver/common/interactions:pointer_cancel",
"//rb/spec/unit/selenium/webdriver/common/interactions:pointer_event_prop",
"//rb/spec/unit/selenium/webdriver/common/interactions:pointer_input",
"//rb/spec/unit/selenium/webdriver/common/interactions:pointer_move",
"//rb/spec/unit/selenium/webdriver/common/interactions:pointer_press",
"//rb/spec/unit/selenium/webdriver/common/interactions:scroll",
"//rb/spec/unit/selenium/webdriver/common/interactions:typing_interactions",
"//rb/spec/unit/selenium/webdriver/common/interactions:wheel_actions",
"//rb/spec/unit/selenium/webdriver/common/interactions:wheel_input",
"//rb/spec/unit/selenium/webdriver/devtools:request",
"//rb/spec/unit/selenium/webdriver/devtools:response",
"//rb/spec/unit/selenium/webdriver/edge:driver",
"//rb/spec/unit/selenium/webdriver/edge:options",
"//rb/spec/unit/selenium/webdriver/edge:service",
"//rb/spec/unit/selenium/webdriver/firefox:driver",
"//rb/spec/unit/selenium/webdriver/firefox:extension",
"//rb/spec/unit/selenium/webdriver/firefox:options",
"//rb/spec/unit/selenium/webdriver/firefox:profile",
"//rb/spec/unit/selenium/webdriver/firefox:service",
"//rb/spec/unit/selenium/webdriver/ie:driver",
"//rb/spec/unit/selenium/webdriver/ie:options",
"//rb/spec/unit/selenium/webdriver/ie:service",
"//rb/spec/unit/selenium/webdriver/remote:bridge",
"//rb/spec/unit/selenium/webdriver/remote:capabilities",
"//rb/spec/unit/selenium/webdriver/remote:driver",
"//rb/spec/unit/selenium/webdriver/remote/http:common",
"//rb/spec/unit/selenium/webdriver/remote/http:default",
"//rb/spec/unit/selenium/webdriver/safari:driver",
"//rb/spec/unit/selenium/webdriver/safari:options",
"//rb/spec/unit/selenium/webdriver/safari:service",
"//rb/spec/unit/selenium/webdriver/support:color",
"//rb/spec/unit/selenium/webdriver/support:event_firing",
"//rb/spec/unit/selenium/webdriver/support:select",
"//rb/spec/unit",
"//rb/spec/unit:spec_helper",
],
)

Expand Down
14 changes: 0 additions & 14 deletions rb/spec/tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,3 @@ def rb_integration_test(
visibility = ["//rb:__subpackages__"],
target_compatible_with = BROWSERS[browser]["target_compatible_with"],
)

def rb_unit_test(name, srcs, deps, data = [], flaky = False):
rb_test(
name = name,
size = "small",
srcs = srcs,
args = ["rb/spec/"],
flaky = flaky,
main = "@bundle//bin:rspec",
data = data,
tags = ["unit"],
deps = ["//rb/spec/unit/selenium/webdriver:spec_helper"] + deps,
visibility = ["//rb:__subpackages__"],
)
48 changes: 48 additions & 0 deletions rb/spec/unit/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
load("@rules_ruby//ruby:defs.bzl", "rb_library", "rb_test")

rb_library(
name = "spec_helper",
testonly = True,
srcs = ["selenium/webdriver/spec_helper.rb"],
visibility = ["//rb/spec:__subpackages__"],
deps = [
"//rb/lib:selenium-webdriver",
"//rb/lib/selenium:webdriver",
"//rb/lib/selenium/webdriver:atoms",
"//rb/spec:rspec_matchers",
"@bundle",
],
)

rb_test(
name = "unit",
size = "small",
srcs = glob(["**/*_spec.rb"]),
args = ["rb/spec/unit/"],
data = [
"//third_party/firebug:favourite_colour-1.1-an+fx.xpi",
"//third_party/firebug:firebug-1.5.0-fx.xpi",
"//third_party/firebug:mooltipass-1.1.87.xpi",
],
main = "@bundle//bin:rspec",
tags = ["unit"],
visibility = ["//rb:__subpackages__"],
deps = [
":spec_helper",
"//rb/lib:selenium-webdriver",
"//rb/lib/selenium:devtools",
"//rb/lib/selenium:server",
"//rb/lib/selenium:webdriver",
"//rb/lib/selenium/devtools:cdp-generate",
"//rb/lib/selenium/webdriver:atoms",
"//rb/lib/selenium/webdriver:bidi",
"//rb/lib/selenium/webdriver:chrome",
"//rb/lib/selenium/webdriver:common",
"//rb/lib/selenium/webdriver:devtools",
"//rb/lib/selenium/webdriver:edge",
"//rb/lib/selenium/webdriver:firefox",
"//rb/lib/selenium/webdriver:ie",
"//rb/lib/selenium/webdriver:remote",
"//rb/lib/selenium/webdriver:safari",
],
)
26 changes: 0 additions & 26 deletions rb/spec/unit/selenium/BUILD.bazel

This file was deleted.

13 changes: 0 additions & 13 deletions rb/spec/unit/selenium/devtools/BUILD.bazel

This file was deleted.

47 changes: 0 additions & 47 deletions rb/spec/unit/selenium/webdriver/BUILD.bazel

This file was deleted.

10 changes: 0 additions & 10 deletions rb/spec/unit/selenium/webdriver/bidi/BUILD.bazel

This file was deleted.

14 changes: 0 additions & 14 deletions rb/spec/unit/selenium/webdriver/chrome/BUILD.bazel

This file was deleted.

58 changes: 0 additions & 58 deletions rb/spec/unit/selenium/webdriver/common/BUILD.bazel

This file was deleted.

16 changes: 0 additions & 16 deletions rb/spec/unit/selenium/webdriver/common/fedcm/BUILD.bazel

This file was deleted.

13 changes: 0 additions & 13 deletions rb/spec/unit/selenium/webdriver/common/interactions/BUILD.bazel

This file was deleted.

10 changes: 0 additions & 10 deletions rb/spec/unit/selenium/webdriver/devtools/BUILD.bazel

This file was deleted.

14 changes: 0 additions & 14 deletions rb/spec/unit/selenium/webdriver/edge/BUILD.bazel

This file was deleted.

Loading
Loading