load("@rules_ruby//ruby:defs.bzl", "rb_library")

rb_library(
    name = "rspec_matchers",
    testonly = True,
    srcs = ["rspec_matchers.rb"],
    visibility = ["//rb/spec:__subpackages__"],
)

# List of dependencies can be gathered by running:
# bazel query 'kind("rb_.* rule", //rb/spec/...) except attr(tags, "browser-test", //rb/spec/...) except //rb/spec:spec' | xargs -I{} echo '"{}",'

rb_library(
    name = "spec",
    testonly = True,
    visibility = ["//rb:__pkg__"],
    deps = [
        "//rb/spec:rspec_matchers",
        "//rb/spec/integration/selenium/webdriver:action_builder",
        "//rb/spec/integration/selenium/webdriver:bidi",
        "//rb/spec/integration/selenium/webdriver:devtools",
        "//rb/spec/integration/selenium/webdriver:driver",
        "//rb/spec/integration/selenium/webdriver:element",
        "//rb/spec/integration/selenium/webdriver:error",
        "//rb/spec/integration/selenium/webdriver:listener",
        "//rb/spec/integration/selenium/webdriver:manager",
        "//rb/spec/integration/selenium/webdriver:navigation",
        "//rb/spec/integration/selenium/webdriver:select",
        "//rb/spec/integration/selenium/webdriver:shadow_root",
        "//rb/spec/integration/selenium/webdriver:spec_helper",
        "//rb/spec/integration/selenium/webdriver:takes_screenshot",
        "//rb/spec/integration/selenium/webdriver:target_locator",
        "//rb/spec/integration/selenium/webdriver:timeout",
        "//rb/spec/integration/selenium/webdriver:virtual_authenticator",
        "//rb/spec/integration/selenium/webdriver:window",
        "//rb/spec/integration/selenium/webdriver/bidi:browsing_context",
        "//rb/spec/integration/selenium/webdriver/bidi:log_inspector",
        "//rb/spec/integration/selenium/webdriver/bidi:network",
        "//rb/spec/integration/selenium/webdriver/bidi:script",
        "//rb/spec/integration/selenium/webdriver/chrome:driver",
        "//rb/spec/integration/selenium/webdriver/chrome:options",
        "//rb/spec/integration/selenium/webdriver/chrome:profile",
        "//rb/spec/integration/selenium/webdriver/chrome:service",
        "//rb/spec/integration/selenium/webdriver/edge:driver",
        "//rb/spec/integration/selenium/webdriver/edge:options",
        "//rb/spec/integration/selenium/webdriver/edge:profile",
        "//rb/spec/integration/selenium/webdriver/edge:service",
        "//rb/spec/integration/selenium/webdriver/firefox:driver",
        "//rb/spec/integration/selenium/webdriver/firefox:profile",
        "//rb/spec/integration/selenium/webdriver/firefox:service",
        "//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:profile",
        "//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:profile",
        "//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",
    ],
)

genrule(
    name = "java-location",
    srcs = [],
    outs = ["java-location.txt"],
    cmd = "echo $(JAVA) > $@",
    toolchains = ["@bazel_tools//tools/jdk:current_java_runtime"],
    visibility = ["//rb/spec:__subpackages__"],
)
