@@ -8,7 +8,6 @@ load("@npm//@angular/build-tooling/bazel/integration:index.bzl", _integration_te
88load ("@npm//@angular/build-tooling/bazel/esbuild:index.bzl" , _esbuild = "esbuild" , _esbuild_config = "esbuild_config" )
99load ("@npm//@angular/build-tooling/bazel/http-server:index.bzl" , _http_server = "http_server" )
1010load ("@npm//@angular/build-tooling/bazel:extract_js_module_output.bzl" , "extract_js_module_output" )
11- load ("@npm//@bazel/protractor:index.bzl" , _protractor_web_test_suite = "protractor_web_test_suite" )
1211load ("//:packages.bzl" , "NO_STAMP_NPM_PACKAGE_SUBSTITUTIONS" , "NPM_PACKAGE_SUBSTITUTIONS" )
1312load ("//:pkg-externals.bzl" , "PKG_EXTERNALS" )
1413load ("//tools/markdown-to-html:index.bzl" , _markdown_to_html = "markdown_to_html" )
@@ -148,12 +147,12 @@ def protractor_web_test_suite(name, deps, **kwargs):
148147 external = ["protractor" , "selenium-webdriver" ],
149148 )
150149
151- _protractor_web_test_suite (
152- name = name ,
153- browsers = ["@npm//@angular/build-tooling/bazel/browsers/chromium:chromium" ],
154- deps = ["%s_bundle" % name ],
155- ** kwargs
156- )
150+ # _protractor_web_test_suite(
151+ # name = name,
152+ # browsers = ["@npm//@angular/build-tooling/bazel/browsers/chromium:chromium"],
153+ # deps = ["%s_bundle" % name],
154+ # **kwargs
155+ # )
157156
158157def node_integration_test (setup_chromium = False , node_repository = "nodejs" , ** kwargs ):
159158 """Macro for defining an integration test with `node` and `yarn` being
@@ -191,20 +190,6 @@ def node_integration_test(setup_chromium = False, node_repository = "nodejs", **
191190 )
192191
193192def ng_web_test_suite (deps = [], static_css = [], exclude_init_script = False , ** kwargs ):
194- bootstrap = [
195- # This matches the ZoneJS bundles used in default CLI projects. See:
196- # https://github.com/angular/angular-cli/blob/main/packages/schematics/angular/application/files/src/polyfills.ts.template#L58
197- # https://github.com/angular/angular-cli/blob/main/packages/schematics/angular/application/files/src/test.ts.template#L3
198- # Note `zone.js/dist/zone.js` is aliased in the CLI to point to the evergreen
199- # output that does not include legacy patches. See: https://github.com/angular/angular/issues/35157.
200- # TODO: Consider adding the legacy patches when testing Saucelabs/Browserstack with Bazel.
201- # CLI loads the legacy patches conditionally for ES5 legacy browsers. See:
202- # https://github.com/angular/angular-cli/blob/277bad3895cbce6de80aa10a05c349b10d9e09df/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts#L141
203- "@npm//:node_modules/zone.js/bundles/zone.umd.js" ,
204- "@npm//:node_modules/zone.js/bundles/zone-testing.umd.js" ,
205- "@npm//:node_modules/reflect-metadata/Reflect.js" ,
206- ] + kwargs .pop ("bootstrap" , [])
207-
208193 # Always include a prebuilt theme in the test suite because otherwise tests, which depend on CSS
209194 # that is needed for measuring, will unexpectedly fail. Also always adding a prebuilt theme
210195 # reduces the amount of setup that is needed to create a test suite Bazel target. Note that the
@@ -213,6 +198,8 @@ def ng_web_test_suite(deps = [], static_css = [], exclude_init_script = False, *
213198 "//src/material/prebuilt-themes:azure-blue" ,
214199 ]
215200
201+ bootstrap = []
202+
216203 # Workaround for https://github.com/bazelbuild/rules_typescript/issues/301
217204 # Since some of our tests depend on CSS files which are not part of the `ng_project` rule,
218205 # we need to somehow load static CSS files within Karma (e.g. overlay prebuilt). Those styles
@@ -226,7 +213,7 @@ def ng_web_test_suite(deps = [], static_css = [], exclude_init_script = False, *
226213 native .genrule (
227214 name = css_id ,
228215 srcs = [css_label ],
229- outs = ["%s.css.js" % css_id ],
216+ outs = ["%s.css.init. js" % css_id ],
230217 output_to_bindir = True ,
231218 cmd = """
232219 files=($(execpaths %s))
@@ -244,8 +231,8 @@ def ng_web_test_suite(deps = [], static_css = [], exclude_init_script = False, *
244231
245232 karma_web_test_suite (
246233 # Depend on our custom test initialization script. This needs to be the first dependency.
247- deps = deps if exclude_init_script else [ "//test:angular_test_init" ] + deps ,
248- bootstrap = bootstrap ,
234+ deps = deps ,
235+ bootstrap = [ "//test:angular_test_init" ] + bootstrap ,
249236 ** kwargs
250237 )
251238
0 commit comments