2019-11-01 14:17:10 -04:00
|
|
|
load("//tools:defaults.bzl", "protractor_web_test_suite", "ts_library")
|
2019-02-01 08:46:38 -05:00
|
|
|
|
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 = [
|
2020-04-24 16:14:28 -04:00
|
|
|
"//dev-infra/benchmark/driver-utilities",
|
2019-02-01 08:46:38 -05:00
|
|
|
"//packages/private/testing",
|
2019-02-20 12:54:42 -05:00
|
|
|
"@npm//@types/jasminewd2",
|
|
|
|
"@npm//@types/selenium-webdriver",
|
|
|
|
"@npm//protractor",
|
2019-02-01 08:46:38 -05:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
protractor_web_test_suite(
|
|
|
|
name = "protractor_tests",
|
2019-07-24 11:52:26 -04:00
|
|
|
data = data,
|
2019-02-01 08:46:38 -05:00
|
|
|
on_prepare = "//modules/playground/e2e_test:start-server.js",
|
|
|
|
server = server,
|
|
|
|
deps = [
|
|
|
|
":%s_lib" % name,
|
2019-02-20 12:54:42 -05:00
|
|
|
"@npm//selenium-webdriver",
|
|
|
|
"@npm//yargs",
|
|
|
|
"@npm//source-map",
|
2019-02-01 08:46:38 -05:00
|
|
|
],
|
2019-02-07 19:02:25 -05:00
|
|
|
**kwargs
|
2019-02-01 08:46:38 -05:00
|
|
|
)
|