angular-cn/packages/examples/forms/BUILD.bazel

58 lines
1.5 KiB
Python

package(default_visibility = ["//visibility:public"])
load("//tools:defaults.bzl", "ng_module", "protractor_web_test_suite", "ts_devserver", "ts_library")
ng_module(
name = "forms_examples",
srcs = glob(
["**/*.ts"],
exclude = ["**/*_spec.ts"],
),
generate_ve_shims = True,
deps = [
"//packages/core",
"//packages/forms",
"//packages/platform-browser",
"//packages/platform-browser-dynamic",
"//packages/router",
"@npm//rxjs",
],
)
ts_library(
name = "forms_e2e_tests_lib",
testonly = True,
srcs = glob(["**/e2e_test/*_spec.ts"]),
tsconfig = "//packages/examples:tsconfig-e2e.json",
deps = [
"//packages/examples/test-utils",
"//packages/private/testing",
"@npm//@types/jasminewd2",
"@npm//protractor",
],
)
ts_devserver(
name = "devserver",
additional_root_paths = ["angular/packages/examples"],
bootstrap = ["//packages/zone.js/dist:zone.js"],
entry_module = "@angular/examples/forms/main",
port = 4200,
scripts = [
"@npm//:node_modules/tslib/tslib.js",
"//tools/rxjs:rxjs_umd_modules",
],
static_files = ["//packages/examples:index.html"],
deps = [":forms_examples"],
)
protractor_web_test_suite(
name = "protractor_tests",
on_prepare = ":start-server.js",
server = ":devserver",
deps = [
":forms_e2e_tests_lib",
"@npm//selenium-webdriver",
],
)