2019-01-28 15:59:25 -05:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
2019-11-25 16:46:16 -05:00
|
|
|
load("//tools:defaults.bzl", "jasmine_node_test", "ng_module", "protractor_web_test_suite", "ts_devserver", "ts_library")
|
2019-01-28 15:59:25 -05:00
|
|
|
|
|
|
|
ng_module(
|
|
|
|
name = "core_examples",
|
|
|
|
srcs = glob(
|
|
|
|
["**/*.ts"],
|
|
|
|
exclude = [
|
|
|
|
"**/*_spec.ts",
|
|
|
|
"**/*_howto.ts",
|
|
|
|
],
|
|
|
|
),
|
2019-11-12 12:52:34 -05:00
|
|
|
generate_ve_shims = True,
|
2019-01-28 15:59:25 -05:00
|
|
|
# TODO: FW-1004 Type checking is currently not complete.
|
|
|
|
type_check = False,
|
|
|
|
deps = [
|
|
|
|
"//packages/animations",
|
|
|
|
"//packages/core",
|
|
|
|
"//packages/platform-browser",
|
|
|
|
"//packages/platform-browser-dynamic",
|
|
|
|
"//packages/platform-browser/animations",
|
|
|
|
"//packages/router",
|
2019-02-20 12:54:42 -05:00
|
|
|
"@npm//rxjs",
|
2019-01-28 15:59:25 -05:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-02-12 14:10:43 -05:00
|
|
|
ts_library(
|
|
|
|
name = "core_tests_lib",
|
|
|
|
testonly = True,
|
|
|
|
srcs = glob(
|
|
|
|
["**/*_spec.ts"],
|
|
|
|
exclude = ["**/e2e_test/*"],
|
|
|
|
),
|
|
|
|
deps = [
|
|
|
|
"//packages/core",
|
|
|
|
"//packages/core/testing",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2019-01-28 15:59:25 -05:00
|
|
|
ts_library(
|
|
|
|
name = "core_e2e_tests_lib",
|
|
|
|
testonly = True,
|
|
|
|
srcs = glob(["**/e2e_test/*_spec.ts"]),
|
|
|
|
tsconfig = "//packages/examples:tsconfig-e2e.json",
|
|
|
|
deps = [
|
|
|
|
"//packages/examples/test-utils",
|
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",
|
2019-11-22 16:12:05 -05:00
|
|
|
additional_root_paths = ["angular/packages/examples"],
|
|
|
|
bootstrap = [
|
|
|
|
"//packages/zone.js/dist:zone.js",
|
|
|
|
"//packages/zone.js/dist:task-tracking.js",
|
|
|
|
],
|
2019-01-28 15:59:25 -05:00
|
|
|
entry_module = "@angular/examples/core/main",
|
|
|
|
port = 4200,
|
2019-02-13 19:31:29 -05:00
|
|
|
scripts = [
|
2019-06-19 00:26:53 -04:00
|
|
|
"@npm//:node_modules/tslib/tslib.js",
|
2019-02-13 19:31:29 -05:00
|
|
|
"//tools/rxjs:rxjs_umd_modules",
|
|
|
|
],
|
2019-11-22 16:12:05 -05:00
|
|
|
static_files = ["//packages/examples:index.html"],
|
2019-01-28 15:59:25 -05:00
|
|
|
deps = [":core_examples"],
|
|
|
|
)
|
|
|
|
|
|
|
|
protractor_web_test_suite(
|
|
|
|
name = "protractor_tests",
|
|
|
|
on_prepare = ":start-server.js",
|
|
|
|
server = ":devserver",
|
|
|
|
deps = [
|
|
|
|
":core_e2e_tests_lib",
|
2019-02-20 12:54:42 -05:00
|
|
|
"@npm//selenium-webdriver",
|
2019-01-28 15:59:25 -05:00
|
|
|
],
|
|
|
|
)
|
2019-02-12 14:10:43 -05:00
|
|
|
|
|
|
|
jasmine_node_test(
|
|
|
|
name = "test",
|
|
|
|
bootstrap = ["angular/tools/testing/init_node_spec.js"],
|
|
|
|
deps = [
|
|
|
|
":core_tests_lib",
|
|
|
|
"//tools/testing:node",
|
|
|
|
],
|
|
|
|
)
|