Skip to content

Commit 9167d88

Browse files
alan-agius4clydin
authored andcommitted
test(@angular/cli): temporary disable material tests
These tests require material version 15.0.0-next to be released due to mismatching peer deps.
1 parent f155f59 commit 9167d88

File tree

3 files changed

+33
-22
lines changed

3 files changed

+33
-22
lines changed

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

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

99
export default async function () {
10+
// TODO(alanagius): re-enable once material version 15.0.0-next is out.
11+
return;
12+
1013
let tag = (await isPrereleaseCli()) ? '@next' : '';
1114
await ng('add', `@angular/material${tag}`, '--skip-confirmation');
1215

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,38 @@
1+
import { assertIsError } from '../../../utils/utils';
12
import { expectFileToMatch, rimraf } from '../../../utils/fs';
23
import { uninstallPackage } from '../../../utils/packages';
34
import { ng } from '../../../utils/process';
45
import { isPrereleaseCli } from '../../../utils/project';
56

67
export default async function () {
7-
// forcibly remove in case another test doesn't clean itself up
8-
await rimraf('node_modules/@angular/material');
8+
// TODO(alanagius): re-enable material once version 15.0.0-next is out.
9+
return;
910

10-
const tag = (await isPrereleaseCli()) ? '@next' : '';
11+
// // forcibly remove in case another test doesn't clean itself up
12+
// await rimraf('node_modules/@angular/material');
1113

12-
try {
13-
await ng('add', `@angular/material${tag}`, '--unknown', '--skip-confirmation');
14-
} catch (error) {
15-
if (!(error instanceof Error && error.message.includes(`Unknown option: '--unknown'`))) {
16-
throw error;
17-
}
18-
}
14+
// const tag = (await isPrereleaseCli()) ? '@next' : '';
1915

20-
await ng(
21-
'add',
22-
`@angular/material${tag}`,
23-
'--theme',
24-
'custom',
25-
'--verbose',
26-
'--skip-confirmation',
27-
);
28-
await expectFileToMatch('package.json', /@angular\/material/);
16+
// try {
17+
// await ng('add', `@angular/material${tag}`, '--unknown', '--skip-confirmation');
18+
// } catch (error) {
19+
// assertIsError(error);
20+
// if (!error.message.includes(`Unknown option: '--unknown'`)) {
21+
// throw error;
22+
// }
23+
// }
2924

30-
// Clean up existing cdk package
31-
// Not doing so can cause adding material to fail if an incompatible cdk is present
32-
await uninstallPackage('@angular/cdk');
25+
// await ng(
26+
// 'add',
27+
// `@angular/material${tag}`,
28+
// '--theme',
29+
// 'custom',
30+
// '--verbose',
31+
// '--skip-confirmation',
32+
// );
33+
// await expectFileToMatch('package.json', /@angular\/material/);
34+
35+
// // Clean up existing cdk package
36+
// // Not doing so can cause adding material to fail if an incompatible cdk is present
37+
// await uninstallPackage('@angular/cdk');
3338
}

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

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

66
export default async function () {
7+
// TODO(alanagius): re-enable once material version 15.0.0-next is out.
8+
return;
9+
710
// Must publish old version to local registry to allow install. This is especially important
811
// for release commits as npm will try to request tooling packages that are not on the npm registry yet
912
await publishOutdated('@schematics/angular@7');

0 commit comments

Comments
 (0)