5f0d5e9ccf
nodejs rules 0.34.0 now includes protractor_web_test_suite rule (via new @bazel/protractor rule) so we switch to that location for that rule in this PR so that /packages/bazel/src/protractor can be removed in a future PR this PR also brings in node toolchain support which was released in nodejs rules 0.33.0. this is a prerequisite for RBE for mac & windows users bazel schematics also updated with the same. @bazel/bazel 0.28.1 npm package includes transitive dep on hide-bazel-files so we're able to remove an explicit dep on that as well. PR Close #31824
42 lines
941 B
Python
42 lines
941 B
Python
load("@npm_bazel_protractor//:index.bzl", "protractor_web_test_suite")
|
|
load("@npm_bazel_typescript//:index.bzl", "ts_library")
|
|
|
|
ts_library(
|
|
name = "e2e",
|
|
testonly = 1,
|
|
srcs = ["app.spec.ts"],
|
|
tsconfig = ":tsconfig.json",
|
|
deps = [
|
|
"@npm//@types/jasmine",
|
|
"@npm//protractor",
|
|
],
|
|
)
|
|
|
|
ts_library(
|
|
name = "ts_on_prepare",
|
|
testonly = 1,
|
|
srcs = ["on-prepare.ts"],
|
|
tsconfig = ":tsconfig.json",
|
|
deps = [
|
|
"@npm//@bazel/protractor",
|
|
"@npm//@types/node",
|
|
"@npm//protractor",
|
|
],
|
|
)
|
|
|
|
protractor_web_test_suite(
|
|
name = "devserver_test",
|
|
configuration = "//:protractor.conf.js",
|
|
on_prepare = ":ts_on_prepare",
|
|
server = "//src:devserver",
|
|
deps = [":e2e"],
|
|
)
|
|
|
|
protractor_web_test_suite(
|
|
name = "prodserver_test",
|
|
configuration = "//:protractor.conf.js",
|
|
on_prepare = ":ts_on_prepare",
|
|
server = "//src:prodserver",
|
|
deps = [":e2e"],
|
|
)
|