load("//rb/spec:tests.bzl", "rb_unit_test")

[
    rb_unit_test(
        name = file[:-8],
        srcs = [file],
        deps = [
            "//rb/lib/selenium/webdriver:common",
            "//rb/lib/selenium/webdriver:remote",
        ],
    )
    for file in glob(
        ["*_spec.rb"],
        exclude = [
            "driver_finder_spec.rb",
            "selenium_manager_spec.rb",
            "service_spec.rb",
        ],
    )
]

rb_unit_test(
    name = "driver_finder",
    srcs = ["driver_finder_spec.rb"],
    deps = [
        "//rb/lib/selenium/webdriver:chrome",
        "//rb/lib/selenium/webdriver:common",
        "//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",
    ],
)

rb_unit_test(
    name = "selenium_manager",
    srcs = ["selenium_manager_spec.rb"],
    deps = [
        "//rb/lib/selenium/webdriver:chrome",
        "//rb/lib/selenium/webdriver:common",
        "//rb/lib/selenium/webdriver:remote",
    ],
)

rb_unit_test(
    name = "service",
    srcs = ["service_spec.rb"],
    deps = [
        "//rb/lib/selenium/webdriver:chrome",
        "//rb/lib/selenium/webdriver:common",
        "//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",
    ],
)
