64 lines
1.8 KiB
Python
64 lines
1.8 KiB
Python
package(default_visibility = ["//visibility:public"])
|
|
|
|
load("//packages/bazel:index.bzl", "protractor_web_test_suite")
|
|
load("//tools:defaults.bzl", "ng_module", "ts_library")
|
|
load("@build_bazel_rules_typescript//:defs.bzl", "ts_devserver")
|
|
|
|
ng_module(
|
|
name = "common_examples",
|
|
srcs = glob(
|
|
["**/*.ts"],
|
|
exclude = ["**/*_spec.ts"],
|
|
),
|
|
# TODO: FW-1004 Type checking is currently not complete.
|
|
type_check = False,
|
|
deps = [
|
|
"//packages/common",
|
|
"//packages/core",
|
|
"//packages/platform-browser",
|
|
"//packages/platform-browser-dynamic",
|
|
"//packages/router",
|
|
"@rxjs",
|
|
],
|
|
)
|
|
|
|
ts_library(
|
|
name = "common_tests_lib",
|
|
testonly = True,
|
|
srcs = glob(["**/*_spec.ts"]),
|
|
tsconfig = "//packages/examples:tsconfig-e2e.json",
|
|
deps = [
|
|
"//packages/examples/test-utils",
|
|
"//packages/private/testing",
|
|
"@ngdeps//@types/jasminewd2",
|
|
"@ngdeps//protractor",
|
|
],
|
|
)
|
|
|
|
ts_devserver(
|
|
name = "devserver",
|
|
entry_module = "@angular/examples/common/main",
|
|
index_html = "//packages/examples:index.html",
|
|
port = 4200,
|
|
scripts = ["@ngdeps//node_modules/tslib:tslib.js"],
|
|
static_files = [
|
|
"@ngdeps//node_modules/zone.js:dist/zone.js",
|
|
# This is needed because the "ngComponentOutlet" test uses the JIT compiler
|
|
# and needs to be able to read metadata at runtime.
|
|
"@ngdeps//node_modules/reflect-metadata:Reflect.js",
|
|
],
|
|
deps = [":common_examples"],
|
|
)
|
|
|
|
protractor_web_test_suite(
|
|
name = "protractor_tests",
|
|
data = ["//packages/bazel/src/protractor/utils"],
|
|
on_prepare = ":start-server.js",
|
|
server = ":devserver",
|
|
deps = [
|
|
":common_tests_lib",
|
|
"@ngdeps//protractor",
|
|
"@ngdeps//selenium-webdriver",
|
|
],
|
|
)
|