2019-01-28 15:59:25 -05:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
load("//packages/bazel:index.bzl", "protractor_web_test_suite")
|
|
|
|
load("//tools:defaults.bzl", "ng_module", "ts_library")
|
2019-02-20 12:54:42 -05:00
|
|
|
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
|
2019-01-28 15:59:25 -05:00
|
|
|
|
|
|
|
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",
|
2019-02-20 12:54:42 -05:00
|
|
|
"@npm//rxjs",
|
2019-01-28 15:59:25 -05:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
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",
|
2019-02-20 12:54:42 -05:00
|
|
|
"@npm//@types/jasminewd2",
|
|
|
|
"@npm//protractor",
|
2019-01-28 15:59:25 -05:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
ts_devserver(
|
|
|
|
name = "devserver",
|
|
|
|
entry_module = "@angular/examples/common/main",
|
|
|
|
index_html = "//packages/examples:index.html",
|
|
|
|
port = 4200,
|
2019-02-13 19:31:29 -05:00
|
|
|
scripts = [
|
2019-06-25 16:11:54 -04:00
|
|
|
"@npm//node_modules/tslib:tslib.js",
|
2019-02-13 19:31:29 -05:00
|
|
|
"//tools/rxjs:rxjs_umd_modules",
|
|
|
|
],
|
2019-01-28 15:59:25 -05:00
|
|
|
static_files = [
|
2019-06-25 16:11:54 -04:00
|
|
|
"@npm//node_modules/zone.js:dist/zone.js",
|
2019-01-28 15:59:25 -05:00
|
|
|
],
|
|
|
|
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",
|
2019-02-20 12:54:42 -05:00
|
|
|
"@npm//protractor",
|
|
|
|
"@npm//selenium-webdriver",
|
2019-01-28 15:59:25 -05:00
|
|
|
],
|
|
|
|
)
|