Skip to content

Commit 54794c9

Browse files
crisbetoalan-agius4
authored andcommitted
build: re-enable Material tests
Re-enables Material tests that had to be disabled during the TS 5.2 update.
1 parent 91019bd commit 54794c9

File tree

3 files changed

+6
-14
lines changed

3 files changed

+6
-14
lines changed

tests/legacy-cli/e2e/tests/build/material.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ import { isPrereleaseCli, updateJsonFile } from '../../utils/project';
77
const snapshots = require('../../ng-snapshot/package.json');
88

99
export default async function () {
10-
// TODO(crisbeto): temporarily disabled until Material is updated to TS 5.2
11-
return;
12-
1310
let tag = (await isPrereleaseCli()) ? '@next' : '';
1411
await ng('add', `@angular/material${tag}`, '--skip-confirmation');
1512

@@ -46,10 +43,10 @@ export default async function () {
4643
// Ensure moment adapter works (uses unique importing mechanism for moment)
4744
// Issue: https://github.com/angular/angular-cli/issues/17320
4845
await replaceInFile(
49-
'src/app/app.module.ts',
50-
`import { AppComponent } from './app.component';`,
46+
'src/app/app.config.ts',
47+
`import { ApplicationConfig } from '@angular/core';`,
5148
`
52-
import { AppComponent } from './app.component';
49+
import { ApplicationConfig } from '@angular/core';
5350
import {
5451
MomentDateAdapter,
5552
MAT_MOMENT_DATE_FORMATS
@@ -63,10 +60,11 @@ export default async function () {
6360
);
6461

6562
await replaceInFile(
66-
'src/app/app.module.ts',
67-
`providers: []`,
63+
'src/app/app.config.ts',
64+
`providers: [provideRouter(routes) ]`,
6865
`
6966
providers: [
67+
provideRouter(routes),
7068
{
7169
provide: DateAdapter,
7270
useClass: MomentDateAdapter,

tests/legacy-cli/e2e/tests/commands/add/add-material.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import { ng } from '../../../utils/process';
55
import { isPrereleaseCli } from '../../../utils/project';
66

77
export default async function () {
8-
// TODO(crisbeto): temporarily disabled until Material is updated to TS 5.2
9-
return;
10-
118
// forcibly remove in case another test doesn't clean itself up
129
await rimraf('node_modules/@angular/material');
1310

tests/legacy-cli/e2e/tests/misc/invalid-schematic-dependencies.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ import { installPackage, uninstallPackage } from '../../utils/packages';
44
import { isPrereleaseCli } from '../../utils/project';
55

66
export default async function () {
7-
// TODO(crisbeto): temporarily disabled until Material is updated to TS 5.2
8-
return;
9-
107
// Must publish old version to local registry to allow install. This is especially important
118
// for release commits as npm will try to request tooling packages that are not on the npm registry yet
129
await publishOutdated('@schematics/angular@7');

0 commit comments

Comments
 (0)