Skip to content

Commit 60f9b19

Browse files
filipesilvavikerman
authored andcommitted
test: use Ivy by default, opt-in to VE
1 parent 1dec90b commit 60f9b19

File tree

95 files changed

+223
-195
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+223
-195
lines changed

.circleci/config.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ jobs:
164164

165165
test-large:
166166
parameters:
167-
ivy:
167+
ve:
168168
type: boolean
169169
default: false
170170
glob:
@@ -176,11 +176,11 @@ jobs:
176176
steps:
177177
- attach_workspace: *attach_options
178178
- run: yarn webdriver-update
179-
- run: yarn test-large --full <<# parameters.ivy >>--ivy<</ parameters.ivy >> <<# parameters.glob >>--glob="<< parameters.glob >>"<</ parameters.glob >> --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX}
179+
- run: yarn test-large --full <<# parameters.ve >>--ve<</ parameters.ve >> <<# parameters.glob >>--glob="<< parameters.glob >>"<</ parameters.glob >> --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX}
180180

181181
e2e-cli:
182182
parameters:
183-
ivy:
183+
ve:
184184
type: boolean
185185
default: false
186186
snapshots:
@@ -195,7 +195,7 @@ jobs:
195195
command: ./.circleci/env.sh
196196
- run:
197197
name: Execute CLI E2E Tests
198-
command: PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX} <<# parameters.ivy >>--ivy<</ parameters.ivy >> <<# parameters.snapshots >>--ng-snapshots<</ parameters.snapshots >>
198+
command: PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e --nb-shards=${CIRCLE_NODE_TOTAL} --shard=${CIRCLE_NODE_INDEX} <<# parameters.ve >>--ve<</ parameters.ve >> <<# parameters.snapshots >>--ng-snapshots<</ parameters.snapshots >>
199199

200200
e2e-cli-node-10:
201201
executor:
@@ -232,7 +232,8 @@ jobs:
232232
# Waits for the Saucelabs tunnel to be ready. This ensures that we don't run tests
233233
# too early without Saucelabs not being ready.
234234
- run: ./scripts/saucelabs/wait-for-tunnel.sh
235-
- run: PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e ./tests/legacy-cli/e2e/tests/misc/browsers.ts
235+
- run: PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e ./tests/legacy-cli/e2e/tests/misc/browsers.ts --ve
236+
- run: PATH=~/.npm-global/bin:$PATH node ./tests/legacy-cli/run_e2e ./tests/legacy-cli/e2e/tests/misc/browsers.ts
236237
- run: ./scripts/saucelabs/stop-tunnel.sh
237238

238239
build:
@@ -249,7 +250,7 @@ jobs:
249250
- attach_workspace: *attach_options
250251
- run: yarn webdriver-update
251252
- run: yarn test-large --full --flakey
252-
- run: yarn test-large --full --flakey --ivy=true
253+
- run: yarn test-large --full --flakey --ve=true
253254

254255
build-bazel:
255256
executor: action-executor
@@ -307,7 +308,7 @@ jobs:
307308
- run: yarn build
308309
- run: yarn test --full
309310
# Run partial e2e suite on PRs only. Master will run the full e2e suite with sharding.
310-
- run: if (Test-Path env:CIRCLE_PR_NUMBER) { node tests\legacy-cli\run_e2e.js "--glob=tests/{basic,ivy}/**" }
311+
- run: if (Test-Path env:CIRCLE_PR_NUMBER) { node tests\legacy-cli\run_e2e.js "--glob=tests/basic/**" }
311312

312313
e2e-cli-win:
313314
executor: windows-executor
@@ -348,8 +349,8 @@ workflows:
348349
requires:
349350
- build
350351
- test-large:
351-
name: test-large-ivy
352-
ivy: true
352+
name: test-large-ve
353+
ve: true
353354
glob: "packages/angular_devkit/@(build_angular|build_ng_packagr)/@(src|test)/@(build|browser)/*_spec_large.ts"
354355
requires:
355356
- build
@@ -361,8 +362,8 @@ workflows:
361362
requires:
362363
- build
363364
- e2e-cli:
364-
name: e2e-cli-ivy
365-
ivy: true
365+
name: e2e-cli-ve
366+
ve: true
366367
requires:
367368
- build
368369
- e2e-cli:
@@ -379,9 +380,9 @@ workflows:
379380
circleci step halt
380381
fi
381382
- e2e-cli:
382-
name: e2e-cli-ng-ivy-snapshots
383+
name: e2e-cli-ng-ve-snapshots
383384
snapshots: true
384-
ivy: true
385+
ve: true
385386
requires:
386387
- e2e-cli
387388
pre-steps:

packages/angular_devkit/build_angular/test/app-shell/app-shell_spec_large.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
import { Architect } from '@angular-devkit/architect/src/architect';
1010
import { getSystemPath, join, normalize, virtualFs } from '@angular-devkit/core';
1111
import * as express from 'express'; // tslint:disable-line:no-implicit-dependencies
12-
import { createArchitect, host } from '../utils';
12+
import { createArchitect, host, veEnabled } from '../utils';
1313

1414

15-
describe('AppShell Builder', () => {
15+
// DISABLED_FOR_IVY These should pass but are currently not supported
16+
(veEnabled ? describe : xdescribe)('AppShell Builder', () => {
1617
const target = { project: 'app', target: 'app-shell' };
1718
let architect: Architect;
1819

packages/angular_devkit/build_angular/test/browser/aot_spec_large.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import { Architect } from '@angular-devkit/architect';
1010
import { join, logging, normalize, virtualFs } from '@angular-devkit/core';
1111
import { BrowserBuilderOutput } from '../../src/browser';
12-
import { createArchitect, host, ivyEnabled } from '../utils';
12+
import { createArchitect, host, veEnabled } from '../utils';
1313

1414
describe('Browser Builder AOT', () => {
1515
const targetSpec = { project: 'app', target: 'build' };
@@ -31,7 +31,7 @@ describe('Browser Builder AOT', () => {
3131

3232
const fileName = join(normalize(output.outputPath), 'main.js');
3333
const content = virtualFs.fileBufferToString(await host.read(normalize(fileName)).toPromise());
34-
if (ivyEnabled) {
34+
if (!veEnabled) {
3535
expect(content).toContain('AppComponent.ngComponentDef');
3636
} else {
3737
expect(content).toMatch(/platformBrowser.*bootstrapModuleFactory.*AppModuleNgFactory/);

packages/angular_devkit/build_angular/test/browser/errors_spec_large.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import { Architect } from '@angular-devkit/architect';
1010
import { logging } from '@angular-devkit/core';
11-
import { createArchitect, host, ivyEnabled } from '../utils';
11+
import { createArchitect, host, veEnabled } from '../utils';
1212

1313
describe('Browser Builder errors', () => {
1414
const targetSpec = { project: 'app', target: 'build' };
@@ -64,7 +64,7 @@ describe('Browser Builder errors', () => {
6464
const run = await architect.scheduleTarget(targetSpec, { aot: true }, { logger });
6565
const output = await run.result;
6666
expect(output.success).toBe(false);
67-
if (ivyEnabled) {
67+
if (!veEnabled) {
6868
expect(logs.join()).toContain('selector must be a string');
6969
} else {
7070
expect(logs.join()).toContain('Function expressions are not supported in');

packages/angular_devkit/build_angular/test/browser/i18n_spec_large.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
import { Architect } from '@angular-devkit/architect';
99
import { join, normalize, virtualFs } from '@angular-devkit/core';
1010
import { BrowserBuilderOutput } from '../../src/browser';
11-
import { createArchitect, host, ivyEnabled } from '../utils';
11+
import { createArchitect, host, veEnabled } from '../utils';
1212

1313
// DISABLED_FOR_IVY - These should pass but are currently not supported
14-
(ivyEnabled ? xdescribe : describe)('Browser Builder i18n', () => {
14+
(veEnabled ? describe : xdescribe)('Browser Builder i18n', () => {
1515
const emptyTranslationFile = `
1616
<?xml version="1.0" encoding="UTF-8" ?>
1717
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">

packages/angular_devkit/build_angular/test/browser/lazy-module_spec_large.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import {
1313
browserBuild,
1414
createArchitect,
1515
host,
16-
ivyEnabled,
1716
lazyModuleFiles,
1817
lazyModuleFnImport,
1918
lazyModuleStringImport,
19+
veEnabled,
2020
} from '../utils';
2121

2222
// tslint:disable-next-line:no-big-function
@@ -64,14 +64,14 @@ describe('Browser Builder lazy modules', () => {
6464
});
6565

6666
it('should show error when lazy route is invalid on watch mode AOT', async () => {
67-
if (ivyEnabled && name === 'string') {
67+
if (!veEnabled && name === 'string') {
6868
pending('Does not apply to Ivy.');
6969

7070
return;
7171
}
7272

7373
// DISABLED_FOR_IVY - These should pass but are currently not supported
74-
if (ivyEnabled) {
74+
if (!veEnabled) {
7575
pending('Broken in Ivy');
7676

7777
return;
@@ -113,7 +113,7 @@ describe('Browser Builder lazy modules', () => {
113113
addLazyLoadedModulesInTsConfig(host, lazyModuleFiles);
114114

115115
const { files } = await browserBuild(architect, host, target, { aot: true });
116-
if (ivyEnabled) {
116+
if (!veEnabled) {
117117
const data = await files['lazy-lazy-module.js'];
118118
expect(data).not.toBeUndefined('Lazy module output bundle does not exist');
119119
expect(data).toContain('LazyModule.ngModuleDef');
@@ -257,7 +257,7 @@ describe('Browser Builder lazy modules', () => {
257257
aot: true,
258258
});
259259

260-
if (ivyEnabled) {
260+
if (!veEnabled) {
261261
const data = await files['src-app-lazy-lazy-module.js'];
262262
expect(data).not.toBeUndefined('Lazy module output bundle does not exist');
263263
expect(data).toContain('LazyModule.ngModuleDef');

packages/angular_devkit/build_angular/test/browser/no-entry-module_spec_large.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import { Architect } from '@angular-devkit/architect';
1010
import { TestLogger } from '@angular-devkit/architect/testing';
11-
import { browserBuild, createArchitect, host, ivyEnabled } from '../utils';
11+
import { browserBuild, createArchitect, host, veEnabled } from '../utils';
1212

1313
describe('Browser Builder no entry module', () => {
1414
const target = { project: 'app', target: 'build' };
@@ -29,7 +29,7 @@ describe('Browser Builder no entry module', () => {
2929
});
3030

3131
it('reports warning when no bootstrap code', async () => {
32-
if (ivyEnabled) {
32+
if (!veEnabled) {
3333
pending('Does not apply to Ivy.');
3434

3535
return;

packages/angular_devkit/build_angular/test/browser/rebuild_spec_large.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ import { debounceTime, take, takeWhile, tap } from 'rxjs/operators';
1313
import {
1414
createArchitect,
1515
host,
16-
ivyEnabled,
1716
lazyModuleFiles,
1817
lazyModuleFnImport,
1918
outputPath,
19+
veEnabled,
2020
} from '../utils';
2121

2222
describe('Browser Builder rebuilds', () => {
@@ -267,7 +267,7 @@ describe('Browser Builder rebuilds', () => {
267267

268268
it('rebuilds after errors in AOT', async () => {
269269
// DISABLED_FOR_IVY - These should pass but are currently not supported
270-
if (ivyEnabled) {
270+
if (!veEnabled) {
271271
pending('Broken in Ivy');
272272

273273
return;
@@ -282,7 +282,7 @@ describe('Browser Builder rebuilds', () => {
282282

283283
const overrides = { watch: true, aot: true };
284284
const logger = new TestLogger('rebuild-aot-errors');
285-
const staticAnalysisError = ivyEnabled
285+
const staticAnalysisError = !veEnabled
286286
? 'selector must be a string'
287287
: 'Function expressions are not supported in decorators';
288288
const syntaxError = 'Declaration or statement expected.';

packages/angular_devkit/build_angular/test/browser/svg_spec_large.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*/
88
import { Architect } from '@angular-devkit/architect';
99
import { join, normalize, virtualFs } from '@angular-devkit/core';
10-
import { createArchitect, host, ivyEnabled, outputPath } from '../utils';
10+
import { createArchitect, host, outputPath, veEnabled } from '../utils';
1111

1212
describe('Browser Builder allow svg', () => {
1313
const target = { project: 'app', target: 'build' };
@@ -55,7 +55,7 @@ describe('Browser Builder allow svg', () => {
5555
host.scopedSync().read(join(outputPath, 'main.js')),
5656
);
5757

58-
if (ivyEnabled) {
58+
if (!veEnabled) {
5959
expect(content).toContain('ɵɵnamespaceSVG');
6060
} else {
6161
expect(content).toContain('":svg:svg"');

packages/angular_devkit/build_angular/test/browser/unused-files-warning_spec_large.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Architect } from '@angular-devkit/architect';
99
import { TestLogger } from '@angular-devkit/architect/testing';
1010
import { debounceTime, take, tap } from 'rxjs/operators';
1111
import { BrowserBuilderOutput } from '../../src/browser/index';
12-
import { createArchitect, host, ivyEnabled } from '../utils';
12+
import { createArchitect, host, veEnabled } from '../utils';
1313

1414
// tslint:disable-next-line:no-big-function
1515
describe('Browser Builder unused files warnings', () => {
@@ -25,7 +25,7 @@ describe('Browser Builder unused files warnings', () => {
2525
afterEach(async () => host.restore().toPromise());
2626

2727
it('should not show warning when all files are used', async () => {
28-
if (!ivyEnabled) {
28+
if (veEnabled) {
2929
// TODO: https://github.com/angular/angular-cli/issues/15056
3030
pending('Only supported in Ivy.');
3131

@@ -43,7 +43,7 @@ describe('Browser Builder unused files warnings', () => {
4343
});
4444

4545
it('should show warning when some files are unused', async () => {
46-
if (!ivyEnabled) {
46+
if (veEnabled) {
4747
// TODO: https://github.com/angular/angular-cli/issues/15056
4848
pending('Only supported in Ivy.');
4949

@@ -67,7 +67,7 @@ describe('Browser Builder unused files warnings', () => {
6767
});
6868

6969
it('should not show warning when type files are used', async () => {
70-
if (!ivyEnabled) {
70+
if (veEnabled) {
7171
// TODO: https://github.com/angular/angular-cli/issues/15056
7272
pending('Only supported in Ivy.');
7373

@@ -95,7 +95,7 @@ describe('Browser Builder unused files warnings', () => {
9595
});
9696

9797
it('works for rebuilds', async () => {
98-
if (!ivyEnabled) {
98+
if (veEnabled) {
9999
// TODO: https://github.com/angular/angular-cli/issues/15056
100100
pending('Only supported in Ivy.');
101101

@@ -163,7 +163,7 @@ describe('Browser Builder unused files warnings', () => {
163163
});
164164

165165
it('should only show warning once per file', async () => {
166-
if (!ivyEnabled) {
166+
if (veEnabled) {
167167
// TODO: https://github.com/angular/angular-cli/issues/15056
168168
pending('Only supported in Ivy.');
169169

packages/angular_devkit/build_angular/test/browser/vendor-source-map_spec_large.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
*/
88
import { Architect } from '@angular-devkit/architect';
99
import * as path from 'path';
10-
import { browserBuild, createArchitect, host, ivyEnabled } from '../utils';
10+
import { browserBuild, createArchitect, host, veEnabled } from '../utils';
1111

1212
// DISABLED_FOR_IVY These should pass but are currently not supported
13-
(ivyEnabled ? xdescribe : describe)('Browser Builder external source map', () => {
13+
(veEnabled ? describe : xdescribe)('Browser Builder external source map', () => {
1414
const target = { project: 'app', target: 'build' };
1515
let architect: Architect;
1616

packages/angular_devkit/build_angular/test/extract-i18n/works_spec_large.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
import { Architect } from '@angular-devkit/architect';
99
import { TestLogger } from '@angular-devkit/architect/testing';
1010
import { join, normalize, virtualFs } from '@angular-devkit/core';
11-
import { createArchitect, extractI18nTargetSpec, host } from '../utils';
11+
import { createArchitect, extractI18nTargetSpec, host, veEnabled } from '../utils';
1212

1313

14-
describe('Extract i18n Target', () => {
14+
// DISABLED_FOR_IVY These should pass but are currently not supported
15+
(veEnabled ? describe : xdescribe)('Extract i18n Target', () => {
1516
const extractionFile = join(normalize('src'), 'messages.xlf');
1617
let architect: Architect;
1718

packages/angular_devkit/build_angular/test/server/base_spec_large.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ import { Architect } from '@angular-devkit/architect';
1010
import { getSystemPath, join, normalize, virtualFs } from '@angular-devkit/core';
1111
import { take, tap } from 'rxjs/operators';
1212
import { BrowserBuilderOutput } from '../../src/browser';
13-
import { createArchitect, host } from '../utils';
13+
import { createArchitect, host, veEnabled } from '../utils';
1414

1515

16-
describe('Server Builder', () => {
16+
// DISABLED_FOR_IVY These should pass but are currently not supported
17+
(veEnabled ? describe : xdescribe)('Server Builder', () => {
1718
const target = { project: 'app', target: 'server' };
1819
let architect: Architect;
1920

packages/angular_devkit/build_angular/test/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ import {
2020
} from '@angular-devkit/core';
2121
import { BrowserBuilderOutput } from '../src/browser';
2222

23-
export const ivyEnabled = process.argv.includes('--ivy');
23+
export const veEnabled = process.argv.includes('--ve');
2424

2525
const devkitRoot = normalize((global as any)._DevKitRoot); // tslint:disable-line:no-any
2626
export const workspaceRoot = join(
2727
devkitRoot,
28-
`tests/angular_devkit/build_angular/hello-world-app${ivyEnabled ? '-ivy' : ''}/`,
28+
`tests/angular_devkit/build_angular/hello-world-app${veEnabled ? '-ve' : ''}/`,
2929
);
3030
export const host = new TestProjectHost(workspaceRoot);
3131
export const outputPath: Path = normalize('dist');

0 commit comments

Comments
 (0)