load(":angular_integration_test.bzl", "angular_integration_test") # Some integration ports must be managed manually to be unique and in other # cases the tests are able to select a random free port. # # Where `ng e2e` is used we pass `ng e2e --port 0` which prompts the cli # to select a random free port for the the e2e test. The protractor.conf is # automaticaly updated to use this port. # # Karma automatically finds a free port so no effort is needed there. # # The manually configured ports are as follows: # # TEST PORT CONFIGURATION # ==== ==== ============= # dynamic-compiler 4201 /e2e/browser.config.json: "port": 4201 # hello_world__closure 4202 /e2e/browser.config.json: "port": 4202 # hello_world__systemjs_umd 4203 /bs-config.e2e.json: "port": 4203 # i18n 4204 /e2e/browser.config.json: "port": 4204 # ng_elements 4205 /e2e/browser.config.json: "port": 4205 # platform-server 4206 /src/server.ts: app.listen(4206,... [ angular_integration_test( name = test_folder + "_test", test_folder = test_folder, ) for test_folder in [ "cli-hello-world", "cli-hello-world-ivy-compat", "cli-hello-world-ivy-minimal", "cli-hello-world-lazy", "cli-hello-world-lazy-rollup", "language_service_plugin", "ng_update", "service-worker-schema", "terser", ] ] # The following tests should not be run with npm packages generated with `--config=ivy` [ angular_integration_test( name = test_folder + "_test", tags = ["no-ivy-aot"], test_folder = test_folder, ) for test_folder in [ # `injectable-def` has .ngfactory imports: # ``` # FAIL: Expected 'ngcc' to add build marker for 'esm2015' in '@angular/common'. # ``` # as it is not expecting the @angular bundles to be generated with `--define=compile=aot` "injectable-def", # `ngcc` fails with: # ``` # + ngc -p tsconfig-app.json # src/main.ts(5,34): error TS2307: Cannot find module './app.ngfactory'. # Error during template compile of 'AppModule' # Function calls are not supported in decorators but 'BrowserModule' was called. # ``` "ngcc", # `ng_update_migrations` has golden tests failures such as: # ``` # ✘ File "src/app/migration-tests/undecorated-derived-classes.ts" does not match the expected output. # -------------------------------------------- # --- src/app/migration-tests/undecorated-derived-classes.ts Expected content # +++ src/app/migration-tests/undecorated-derived-classes.ts Actual content # @@ -1,50 +1,19 @@ # -import { Directive, NgModule, NgZone, Component } from '@angular/core'; # -import { CheckboxControlValueAccessor, NG_VALUE_ACCESSOR, NG_ASYNC_VALIDATORS } from '@angular/forms'; # -import { BaseComponentFromOtherFile, hostBindings } from './base-component'; # +import {Directive, NgModule, NgZone} from '@angular/core'; # +import {CheckboxControlValueAccessor} from '@angular/forms'; # +import {BaseComponentFromOtherFile} from './base-component'; # ``` "ng_update_migrations", # `i18n` has .ngfactory imports: # ``` # $ ngc && yarn run closure && concurrently "yarn run serve" "yarn run protractor" --kill-others --success first && npm run test-locale-folder # src/main.ts(2,34): error TS2307: Cannot find module './app.ngfactory'. # Unexpected value 'BrowserModule in /private/var/folders/0l/nj_q9kzj49gdz1w6f5v9tw3h0000gn/T/tmp-58883IJeiUMLGHRRQ/node_modules/@angular/platform-browser/src/browser.d.ts' imported by the module 'AppModule in /private/var/folders/0l/nj_q9kzj49gdz1w6f5v9tw3h0000gn/T/tmp-58883IJeiUMLGHRRQ/src/app.ts'. Please add a @NgModule annotation. # ``` "i18n", # `ivy-i18n` fails with: # ``` # ERROR in Unexpected value 'BrowserModule in /private/var/folders/0l/nj_q9kzj49gdz1w6f5v9tw3h0000gn/T/tmp-59999cYHm5rQoUk0v/node_modules/@angular/platform-browser/src/browser.d.ts' imported by the module 'AppModule in /private/var/folders/0l/nj_q9kzj49gdz1w6f5v9tw3h0000gn/T/tmp-59999cYHm5rQoUk0v/src/app/app.module.ts'. Please add a @NgModule annotation. # @angular/core/src/i18n/tokens.ts(31,22): Error during template compile of 'LOCALE_ID' # Only initialized variables and constants can be referenced in decorators because the value of this variable is needed by the template compiler. # Can't resolve all parameters for AppComponent in /private/var/folders/0l/nj_q9kzj49gdz1w6f5v9tw3h0000gn/T/tmp-59999cYHm5rQoUk0v/src/app/app.component.ts: (?). # The pipe 'percent' could not be found (" # #

{{ locale }}

#

{{ [ERROR ->]1 | percent }} awesome

#

{{ jan | date : 'LLLL' }}

#

Here are some links to help") # The pipe 'date' could not be found (" #

{{ locale }}

#

{{ 1 | percent }} awesome

#

{{ [ERROR ->]jan | date : 'LLLL' }}

#

Here are some links to help you start:

#