2017-06-02 12:43:52 -04:00
|
|
|
package(default_visibility = ["//visibility:public"])
|
2017-12-06 09:56:49 -05:00
|
|
|
|
2018-12-18 01:09:39 -05:00
|
|
|
load("//tools:defaults.bzl", "karma_web_test")
|
2018-03-20 16:13:06 -04:00
|
|
|
|
2017-12-17 18:10:54 -05:00
|
|
|
exports_files([
|
2018-03-01 13:41:35 -05:00
|
|
|
"LICENSE",
|
2018-07-06 18:42:07 -04:00
|
|
|
"protractor-perf.conf.js",
|
2018-12-18 01:09:39 -05:00
|
|
|
"karma-js.conf.js",
|
|
|
|
"browser-providers.conf.js",
|
2017-12-17 18:10:54 -05:00
|
|
|
])
|
2017-06-02 12:43:52 -04:00
|
|
|
|
2019-04-02 14:42:58 -04:00
|
|
|
alias(
|
|
|
|
name = "tsconfig.json",
|
|
|
|
actual = "//packages:tsconfig-build.json",
|
|
|
|
)
|
|
|
|
|
2017-12-16 14:35:47 -05:00
|
|
|
filegroup(
|
2017-12-18 18:37:05 -05:00
|
|
|
name = "web_test_bootstrap_scripts",
|
2017-12-16 14:35:47 -05:00
|
|
|
# do not sort
|
|
|
|
srcs = [
|
2019-06-19 00:26:53 -04:00
|
|
|
"@npm//:node_modules/core-js/client/core.js",
|
2019-10-05 23:06:53 -04:00
|
|
|
"//packages/zone.js/dist:zone.js",
|
|
|
|
"//packages/zone.js/dist:zone-testing.js",
|
|
|
|
"//packages/zone.js/dist:task-tracking.js",
|
2018-06-04 17:58:23 -04:00
|
|
|
"//:test-events.js",
|
2018-12-18 01:09:39 -05:00
|
|
|
"//:shims_for_IE.js",
|
|
|
|
# Including systemjs because it defines `__eval`, which produces correct stack traces.
|
2019-06-19 00:26:53 -04:00
|
|
|
"@npm//:node_modules/systemjs/dist/system.src.js",
|
|
|
|
"@npm//:node_modules/reflect-metadata/Reflect.js",
|
2017-12-16 14:35:47 -05:00
|
|
|
],
|
|
|
|
)
|
2017-12-18 18:37:05 -05:00
|
|
|
|
|
|
|
filegroup(
|
2018-05-31 02:49:37 -04:00
|
|
|
name = "angularjs_scripts",
|
2017-12-18 18:37:05 -05:00
|
|
|
srcs = [
|
2018-12-17 12:28:06 -05: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-19 00:26:53 -04: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 18:37:05 -05:00
|
|
|
],
|
|
|
|
)
|
2018-10-04 16:14:14 -04:00
|
|
|
|
2020-01-13 17:40:21 -05: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-18 01:09:39 -05:00
|
|
|
karma_web_test(
|
2019-12-06 10:17:09 -05:00
|
|
|
name = "saucelabs_unit_tests",
|
2020-01-09 14:59:47 -05: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 17:40:21 -05:00
|
|
|
karma = "//tools/saucelabs:karma-saucelabs",
|
2019-12-06 10:17:09 -05:00
|
|
|
tags = [
|
|
|
|
"manual",
|
2020-01-13 17:40:21 -05:00
|
|
|
"no-remote-exec",
|
2019-12-06 10:17:09 -05:00
|
|
|
"saucelabs",
|
|
|
|
],
|
|
|
|
deps = [
|
|
|
|
"//packages/core/test/acceptance:acceptance_lib",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2020-01-13 17:40:21 -05: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 10:17:09 -05:00
|
|
|
# subset of the legacy saucelabs tests.
|
2020-01-13 17:40:21 -05: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-18 01:09:39 -05:00
|
|
|
)
|