@@ -163,16 +163,6 @@ def karma_web_test_suite(name, **kwargs):
163
163
kwargs ["srcs" ] = ["@npm//:node_modules/tslib/tslib.js" ] + getAngularUmdTargets () + kwargs .get ("srcs" , [])
164
164
kwargs ["deps" ] = ["//tools/rxjs:rxjs_umd_modules" ] + kwargs .get ("deps" , [])
165
165
166
- # Set up default browsers if no explicit `browsers` have been specified.
167
- if not hasattr (kwargs , "browsers" ):
168
- kwargs ["tags" ] = ["native" ] + kwargs .get ("tags" , [])
169
- kwargs ["browsers" ] = [
170
- # Note: when changing the browser names here, also update the "yarn test"
171
- # script to reflect the new browser names.
172
- "@npm_angular_dev_infra_private//browsers:chromium" ,
173
- "@io_bazel_rules_webtesting//browsers:firefox-local" ,
174
- ]
175
-
176
166
for opt_name in kwargs .keys ():
177
167
# Filter out options which are specific to "karma_web_test" targets. We cannot
178
168
# pass options like "browsers" to the local web test target.
@@ -208,11 +198,10 @@ def karma_web_test_suite(name, **kwargs):
208
198
def protractor_web_test_suite (flaky = True , ** kwargs ):
209
199
_protractor_web_test_suite (
210
200
flaky = flaky ,
211
- browsers = ["@npm_angular_dev_infra_private//browsers:chromium" ],
212
201
** kwargs
213
202
)
214
203
215
- def ng_web_test_suite (deps = [], static_css = [], bootstrap = [], ** kwargs ):
204
+ def ng_web_test_suite (deps = [], static_css = [], bootstrap = [], tags = [], ** kwargs ):
216
205
# Always include a prebuilt theme in the test suite because otherwise tests, which depend on CSS
217
206
# that is needed for measuring, will unexpectedly fail. Also always adding a prebuilt theme
218
207
# reduces the amount of setup that is needed to create a test suite Bazel target. Note that the
@@ -256,6 +245,12 @@ def ng_web_test_suite(deps = [], static_css = [], bootstrap = [], **kwargs):
256
245
deps = [
257
246
"//test:angular_test_init" ,
258
247
] + deps ,
248
+ browsers = [
249
+ # Note: when changing the browser names here, also update the "yarn test"
250
+ # script to reflect the new browser names.
251
+ "@io_bazel_rules_webtesting//browsers:chromium-local" ,
252
+ "@io_bazel_rules_webtesting//browsers:firefox-local" ,
253
+ ],
259
254
bootstrap = [
260
255
# This matches the ZoneJS bundles used in default CLI projects. See:
261
256
# https://github.com/angular/angular-cli/blob/master/packages/schematics/angular/application/files/src/polyfills.ts.template#L58
@@ -269,5 +264,6 @@ def ng_web_test_suite(deps = [], static_css = [], bootstrap = [], **kwargs):
269
264
"@npm//:node_modules/zone.js/dist/zone-testing.js" ,
270
265
"@npm//:node_modules/reflect-metadata/Reflect.js" ,
271
266
] + bootstrap ,
267
+ tags = ["native" ] + tags ,
272
268
** kwargs
273
269
)
0 commit comments