2019-04-25 09:51:08 -04:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
|
|
|
|
load("//tools:defaults.bzl", "ng_module", "ts_library")
|
2019-07-24 11:52:26 -04:00
|
|
|
load("@npm_bazel_protractor//:index.bzl", "protractor_web_test_suite")
|
2019-04-25 09:51:08 -04:00
|
|
|
load("@npm_bazel_typescript//:index.bzl", "ts_devserver")
|
|
|
|
|
|
|
|
ng_module(
|
|
|
|
name = "sw_registration_options_examples",
|
|
|
|
srcs = glob(
|
|
|
|
["**/*.ts"],
|
|
|
|
exclude = ["**/*_spec.ts"],
|
|
|
|
),
|
|
|
|
# TODO: FW-1004 Type checking is currently not complete.
|
|
|
|
type_check = False,
|
|
|
|
deps = [
|
|
|
|
"//packages/core",
|
|
|
|
"//packages/platform-browser",
|
|
|
|
"//packages/platform-browser-dynamic",
|
|
|
|
"//packages/service-worker",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
ts_library(
|
|
|
|
name = "sw_registration_options_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",
|
|
|
|
entry_module = "@angular/examples/service-worker/registration-options/main",
|
|
|
|
index_html = "//packages/examples:index.html",
|
|
|
|
port = 4200,
|
|
|
|
scripts = [
|
|
|
|
"//tools/rxjs:rxjs_umd_modules",
|
2019-06-19 00:26:53 -04:00
|
|
|
"@npm//:node_modules/tslib/tslib.js",
|
2019-04-25 09:51:08 -04:00
|
|
|
],
|
|
|
|
static_files = [
|
|
|
|
"ngsw-worker.js",
|
2019-06-19 00:26:53 -04:00
|
|
|
"@npm//:node_modules/zone.js/dist/zone.js",
|
2019-04-25 09:51:08 -04:00
|
|
|
],
|
|
|
|
deps = [":sw_registration_options_examples"],
|
|
|
|
)
|
|
|
|
|
|
|
|
protractor_web_test_suite(
|
|
|
|
name = "protractor_tests",
|
|
|
|
on_prepare = "start-server.js",
|
|
|
|
server = ":devserver",
|
|
|
|
deps = [
|
|
|
|
":sw_registration_options_e2e_tests_lib",
|
|
|
|
"@npm//protractor",
|
|
|
|
"@npm//selenium-webdriver",
|
|
|
|
],
|
|
|
|
)
|