2017-06-02 09:43:52 -07:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
2017-12-06 06:56:49 -08:00
|
|
|
|
2018-12-17 22:09:39 -08:00
|
|
|
load("//tools:defaults.bzl", "karma_web_test")
|
2018-03-20 13:13:06 -07:00
|
|
|
|
2017-12-17 15:10:54 -08:00
|
|
|
exports_files([
|
2018-03-01 10:41:35 -08:00
|
|
|
"LICENSE",
|
2018-07-06 15:42:07 -07:00
|
|
|
"protractor-perf.conf.js",
|
2018-12-17 22:09:39 -08:00
|
|
|
"karma-js.conf.js",
|
|
|
|
"browser-providers.conf.js",
|
2017-12-17 15:10:54 -08:00
|
|
|
])
|
2017-06-02 09:43:52 -07:00
|
|
|
|
2019-04-02 11:42:58 -07:00
|
|
|
alias(
|
|
|
|
name = "tsconfig.json",
|
|
|
|
actual = "//packages:tsconfig-build.json",
|
|
|
|
)
|
|
|
|
|
2017-12-16 11:35:47 -08:00
|
|
|
filegroup(
|
2017-12-18 15:37:05 -08:00
|
|
|
name = "web_test_bootstrap_scripts",
|
2017-12-16 11:35:47 -08:00
|
|
|
# do not sort
|
|
|
|
srcs = [
|
2019-06-18 21:26:53 -07:00
|
|
|
"@npm//:node_modules/core-js/client/core.js",
|
2019-10-06 12:06:53 +09:00
|
|
|
"//packages/zone.js/dist:zone.js",
|
|
|
|
"//packages/zone.js/dist:zone-testing.js",
|
|
|
|
"//packages/zone.js/dist:task-tracking.js",
|
2018-06-04 14:58:23 -07:00
|
|
|
"//:test-events.js",
|
2018-12-17 22:09:39 -08:00
|
|
|
"//:shims_for_IE.js",
|
|
|
|
# Including systemjs because it defines `__eval`, which produces correct stack traces.
|
2019-06-18 21:26:53 -07:00
|
|
|
"@npm//:node_modules/systemjs/dist/system.src.js",
|
|
|
|
"@npm//:node_modules/reflect-metadata/Reflect.js",
|
2017-12-16 11:35:47 -08:00
|
|
|
],
|
|
|
|
)
|
2017-12-18 15:37:05 -08:00
|
|
|
|
|
|
|
filegroup(
|
2018-05-30 23:49:37 -07:00
|
|
|
name = "angularjs_scripts",
|
2017-12-18 15:37:05 -08:00
|
|
|
srcs = [
|
2018-12-17 18:28:06 +01:00
|
|
|
# We also declare the unminfied AngularJS files since these can be used for
|
|
|
|
# local debugging (e.g. see: packages/upgrade/test/common/test_helpers.ts)
|
2019-06-18 21:26:53 -07:00
|
|
|
"@npm//:node_modules/angular/angular.js",
|
|
|
|
"@npm//:node_modules/angular/angular.min.js",
|
|
|
|
"@npm//:node_modules/angular-1.5/angular.js",
|
|
|
|
"@npm//:node_modules/angular-1.5/angular.min.js",
|
|
|
|
"@npm//:node_modules/angular-1.6/angular.js",
|
|
|
|
"@npm//:node_modules/angular-1.6/angular.min.js",
|
|
|
|
"@npm//:node_modules/angular-mocks/angular-mocks.js",
|
|
|
|
"@npm//:node_modules/angular-mocks-1.5/angular-mocks.js",
|
|
|
|
"@npm//:node_modules/angular-mocks-1.6/angular-mocks.js",
|
2017-12-18 15:37:05 -08:00
|
|
|
],
|
|
|
|
)
|
2018-10-04 13:14:14 -07:00
|
|
|
|
2020-01-13 14:40:21 -08:00
|
|
|
# To run manually:
|
|
|
|
# Setup your SAUCE_USERNAME, SAUCE_ACCESS_KEY & SAUCE_TUNNEL_IDENTIFIER.
|
|
|
|
# If on OSX, also set SAUCE_CONNECT to the path of your `sc` binary.
|
|
|
|
# environment variables and run:
|
|
|
|
# ```
|
|
|
|
# yarn bazel run //tools/saucelabs:sauce_service_setup
|
|
|
|
# yarn bazel test //:saucelabs_unit_tests --config=saucelabs --config=ivy
|
|
|
|
# ```
|
|
|
|
# See /tools/saucelabs/README.md for more info on karma Saucelabs tests under Bazel.
|
2018-12-17 22:09:39 -08:00
|
|
|
karma_web_test(
|
2019-12-06 16:17:09 +01:00
|
|
|
name = "saucelabs_unit_tests",
|
2020-01-09 20:59:47 +01:00
|
|
|
# Default timeout is moderate (5min). This causes the test to be terminated while
|
|
|
|
# Saucelabs browsers keep running. Ultimately resulting in failing tests and browsers
|
|
|
|
# unnecessarily being acquired. Our specified Saucelabs idle timeout is 10min, so we use
|
|
|
|
# Bazel's long timeout (15min). This ensures that Karma can shut down properly.
|
|
|
|
timeout = "long",
|
2020-01-13 14:40:21 -08:00
|
|
|
karma = "//tools/saucelabs:karma-saucelabs",
|
2019-12-06 16:17:09 +01:00
|
|
|
tags = [
|
|
|
|
"manual",
|
2020-01-13 14:40:21 -08:00
|
|
|
"no-remote-exec",
|
2019-12-06 16:17:09 +01:00
|
|
|
"saucelabs",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
"//packages/core/test/acceptance:acceptance_lib",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2020-01-13 14:40:21 -08:00
|
|
|
SAUCE_TEST_SUITE_TARGETS = [
|
|
|
|
"packages/common/http/test:test_lib",
|
|
|
|
"packages/common/http/testing/test:test_lib",
|
|
|
|
"packages/common/test:test_lib",
|
|
|
|
"packages/core/test:test_lib",
|
|
|
|
"packages/forms/test:test_lib",
|
|
|
|
"packages/http/test:test_lib",
|
|
|
|
]
|
|
|
|
|
|
|
|
[
|
|
|
|
# These target runs in CI with View Engine as a Saucelabs and Bazel proof-of-concept. It's a
|
2019-12-06 16:17:09 +01:00
|
|
|
# subset of the legacy saucelabs tests.
|
2020-01-13 14:40:21 -08:00
|
|
|
karma_web_test(
|
|
|
|
name = "saucelabs_unit_tests_poc_%s" % test.replace("/", "_").replace(":", "_").replace(".", "_"),
|
|
|
|
# Default timeout is moderate (5min). This causes the test to be terminated while
|
|
|
|
# Saucelabs browsers keep running. Ultimately resulting in failing tests and browsers
|
|
|
|
# unnecessarily being acquired. Our specified Saucelabs idle timeout is 10min, so we use
|
|
|
|
# Bazel's long timeout (15min). This ensures that Karma can shut down properly.
|
|
|
|
timeout = "long",
|
|
|
|
karma = "//tools/saucelabs:karma-saucelabs",
|
|
|
|
tags = [
|
|
|
|
"exclusive",
|
|
|
|
"manual",
|
|
|
|
"no-remote-exec",
|
|
|
|
"saucelabs",
|
|
|
|
],
|
|
|
|
deps = ["//%s" % test],
|
|
|
|
)
|
|
|
|
for test in SAUCE_TEST_SUITE_TARGETS
|
|
|
|
]
|
|
|
|
|
|
|
|
# To run manually:
|
|
|
|
# Setup your SAUCE_USERNAME, SAUCE_ACCESS_KEY & SAUCE_TUNNEL_IDENTIFIER.
|
|
|
|
# If on OSX, also set SAUCE_CONNECT to the path of your `sc` binary.
|
|
|
|
# environment variables and run:
|
|
|
|
# ```
|
|
|
|
# yarn bazel run //tools/saucelabs:sauce_service_setup
|
|
|
|
# yarn bazel test //:saucelabs_unit_tests_poc_suite --config=saucelabs
|
|
|
|
# ```
|
|
|
|
# See /tools/saucelabs/README.md for more info on karma Saucelabs tests under Bazel.
|
|
|
|
test_suite(
|
|
|
|
name = "saucelabs_unit_tests_poc_suite",
|
|
|
|
tags = ["manual"],
|
|
|
|
tests = ["//:saucelabs_unit_tests_poc_%s" % test.replace("/", "_").replace(":", "_").replace(".", "_") for test in SAUCE_TEST_SUITE_TARGETS],
|
2018-12-17 22:09:39 -08:00
|
|
|
)
|