2019-02-01 08:46:38 -05:00
|
|
|
load("//packages/bazel:index.bzl", "protractor_web_test_suite")
|
|
|
|
load("//tools:defaults.bzl", "ts_library")
|
|
|
|
|
2019-02-07 19:02:25 -05:00
|
|
|
def example_test(name, srcs, server, data = [], **kwargs):
|
2019-02-01 08:46:38 -05:00
|
|
|
ts_library(
|
|
|
|
name = "%s_lib" % name,
|
|
|
|
testonly = True,
|
|
|
|
srcs = srcs,
|
|
|
|
tsconfig = "//modules/playground:tsconfig-e2e.json",
|
|
|
|
deps = [
|
|
|
|
"//modules/e2e_util",
|
|
|
|
"//packages/private/testing",
|
|
|
|
"@ngdeps//@types/jasminewd2",
|
|
|
|
"@ngdeps//@types/selenium-webdriver",
|
|
|
|
"@ngdeps//protractor",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
protractor_web_test_suite(
|
|
|
|
name = "protractor_tests",
|
|
|
|
data = ["//packages/bazel/src/protractor/utils"] + data,
|
|
|
|
on_prepare = "//modules/playground/e2e_test:start-server.js",
|
|
|
|
server = server,
|
|
|
|
deps = [
|
|
|
|
":%s_lib" % name,
|
|
|
|
"@ngdeps//protractor",
|
|
|
|
"@ngdeps//selenium-webdriver",
|
|
|
|
"@ngdeps//yargs",
|
|
|
|
"@ngdeps//source-map",
|
|
|
|
],
|
2019-02-07 19:02:25 -05:00
|
|
|
**kwargs
|
2019-02-01 08:46:38 -05:00
|
|
|
)
|