Skip to content

Commit

Permalink
[bazel]: Running buildifer again
Browse files Browse the repository at this point in the history
  • Loading branch information
shs96c committed Nov 27, 2018
1 parent 2a730f8 commit 4dd4640
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 38 deletions.
18 changes: 9 additions & 9 deletions java/bazel-rules.bzl
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
_PREFIXES = ("com", "io", "net", "org")

_BROWSERS = {
"chrome": [ "-Dselenium.browser=chrome" ],
"edge": [ "-Dselenium.browser=edge" ],
"firefox": [ "-Dselenium.browser=ff"],
"ie" : [ "-Dselenium.browser=ie", "-Dselenium.browser.native_events=true"],
"safari": [ "-Dselenium.browser=safari" ],
"chrome": ["-Dselenium.browser=chrome"],
"edge": ["-Dselenium.browser=edge"],
"firefox": ["-Dselenium.browser=ff"],
"ie": ["-Dselenium.browser=ie", "-Dselenium.browser.native_events=true"],
"safari": ["-Dselenium.browser=safari"],
}

def _contains(list, value):
Expand Down Expand Up @@ -62,7 +62,7 @@ def gen_java_tests(size, srcs = [], tags = [], deps = [], **kwargs):
for src in srcs:
native.java_test(
name = _shortName(src),
size = size,
size = size,
test_class = _className(src),
tags = actual_tags,
runtime_deps = deps,
Expand Down Expand Up @@ -90,10 +90,10 @@ def gen_java_selenium_tests(srcs = [], deps = [], drivers = _BROWSERS.keys(), ta
for src in srcs:
native.java_test(
name = "%s-%s" % (_shortName(src), driver),
size = "large",
size = "large",
test_class = _className(src),
jvm_flags = _BROWSERS[driver],
tags = actual_tags,
runtime_deps = deps,
**kwargs)

**kwargs
)
8 changes: 4 additions & 4 deletions java/client/src/org/openqa/selenium/remote/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ TYPE_SOURCES = [

genrule(
name = "is-displayed",
outs = ["isDisplayed.js"],
cmd = "cp \"$(location //javascript/atoms:is-displayed.js)\" \"$@\"",
srcs = [
"//javascript/atoms:is-displayed.js",
],
outs = ["isDisplayed.js"],
cmd = "cp \"$(location //javascript/atoms:is-displayed.js)\" \"$@\"",
)

genrule(
name = "get-attribute",
outs = ["getAttribute.js"],
cmd = "cp \"$(location //javascript/webdriver/atoms:get-attribute.js)\" \"$@\"",
srcs = [
"//javascript/webdriver/atoms:get-attribute.js",
],
outs = ["getAttribute.js"],
cmd = "cp \"$(location //javascript/webdriver/atoms:get-attribute.js)\" \"$@\"",
)

java_library(
Expand Down
7 changes: 5 additions & 2 deletions java/client/test/org/openqa/selenium/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//java:bazel-rules.bzl", "gen_java_tests", "gen_java_selenium_tests")
load("//java:bazel-rules.bzl", "gen_java_selenium_tests", "gen_java_tests")

SMALL_TESTS = [
"ArchitectureTest.java",
Expand Down Expand Up @@ -48,7 +48,10 @@ java_library(
)

gen_java_selenium_tests(
srcs = glob([ "*Test.java" ], exclude = SMALL_TESTS),
srcs = glob(
["*Test.java"],
exclude = SMALL_TESTS,
),
deps = [
":selenium",
"//java/client/src/org/openqa/selenium/firefox",
Expand Down
4 changes: 2 additions & 2 deletions java/client/test/org/openqa/selenium/testing/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ java_library(
"//java/server/test/org/openqa:__subpackages__",
],
exports = [
":test-base",
":annotations",
":test-base",
],
)

Expand Down Expand Up @@ -44,8 +44,8 @@ java_library(
":annotations",
"//java/client/src/org/openqa/selenium/remote",
"//java/client/src/org/openqa/selenium/support",
"//java/client/test/org/openqa/selenium/environment",
"//java/client/test/org/openqa/selenium/build",
"//java/client/test/org/openqa/selenium/environment",
"//java/client/test/org/openqa/selenium/testing/drivers",
"//third_party/java/assertj",
"//third_party/java/github:org.eclipse.egit.github.core",
Expand Down
6 changes: 3 additions & 3 deletions javascript/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ filegroup(

closure_js_deps(
name = "deps",
visibility = [
"//java/client/test/org/openqa/selenium/environment:__pkg__",
],
deps = [
"//javascript/atoms",
"//javascript/webdriver",
],
visibility = [
"//java/client/test/org/openqa/selenium/environment:__pkg__",
],
)
19 changes: 11 additions & 8 deletions javascript/atoms/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,32 @@ load("//javascript:bazel-rules.bzl", "selenium_js_fragment")

closure_js_library(
name = "atoms",
srcs = glob(["**/*.js"], exclude = ["test/**"]),
srcs = glob(
["**/*.js"],
exclude = ["test/**"],
),
suppress = [
"analyzerChecks",
"reportUnknownTypes",
"strictCheckTypes",
],
deps = [
"@io_bazel_rules_closure//closure/library",
"//third_party/js/wgxpath:wgxpath",
],
visibility = [
"//javascript:__pkg__",
"//javascript/webdriver:__subpackages__",
],
deps = [
"//third_party/js/wgxpath",
"@io_bazel_rules_closure//closure/library",
],
)

selenium_js_fragment(
name = "is-displayed",
function = "bot.dom.isShown",
deps = [
":atoms",
],
visibility = [
"//java/client/src/org/openqa/selenium/remote:__pkg__",
],
deps = [
":atoms",
],
)
13 changes: 8 additions & 5 deletions javascript/webdriver/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ load(

closure_js_library(
name = "webdriver",
srcs = glob(["*.js", "http/*.js"]),
srcs = glob([
"*.js",
"http/*.js",
]),
visibility = [
"//javascript:__pkg__",
"//javascript/webdriver/atoms:__pkg__",
],
deps = [
"//javascript/atoms",
"@io_bazel_rules_closure//closure/library",
],
visibility = [
"//javascript:__pkg__",
"//javascript/webdriver/atoms:__pkg__",
]
)
6 changes: 3 additions & 3 deletions javascript/webdriver/atoms/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ closure_js_library(
selenium_js_fragment(
name = "get-attribute",
function = "webdriver.atoms.element.attribute.get",
deps = [
":atoms",
],
visibility = [
"//java/client/src/org/openqa/selenium/remote:__pkg__",
],
deps = [
":atoms",
],
)
3 changes: 2 additions & 1 deletion third_party/java/littleshoot/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ java_import(
],
deps = [
"//third_party/java/slf4j",
],)
],
)
2 changes: 1 addition & 1 deletion third_party/js/wgxpath/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ closure_js_library(
"strictCheckTypes",
"strictMissingRequire",
],
visibility = ["//visibility:public"],
deps = [
"@io_bazel_rules_closure//closure/library",
],
visibility = ["//visibility:public"],
)

0 comments on commit 4dd4640

Please sign in to comment.