Skip to content

Commit 3b06ad3

Browse files
alan-agius4filipesilva
authored andcommitted
test: update material tests to use version 10
1 parent a042290 commit 3b06ad3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

Diff for: tests/legacy-cli/e2e/tests/build/material.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { getGlobalVariable } from '../../utils/env';
22
import { replaceInFile } from '../../utils/fs';
33
import { ng, silentNpm } from '../../utils/process';
4-
import { updateJsonFile } from '../../utils/project';
4+
import { isPrereleaseCli, updateJsonFile } from '../../utils/project';
55

66
const snapshots = require('../../ng-snapshot/package.json');
77

88
export default async function () {
9-
await ng('add', '@angular/material');
9+
const tag = await isPrereleaseCli() ? '@next' : '';
10+
await ng('add', `@angular/material${tag}`);
1011

1112
const isSnapshotBuild = getGlobalVariable('argv')['ng-snapshots'];
1213
if (isSnapshotBuild) {

Diff for: tests/legacy-cli/e2e/tests/commands/add/add-material.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
import { expectFileToMatch, rimraf } from '../../../utils/fs';
22
import { ng } from '../../../utils/process';
3+
import { isPrereleaseCli } from '../../../utils/project';
34

45

56
export default async function () {
67
// forcibly remove in case another test doesn't clean itself up
78
await rimraf('node_modules/@angular/material');
89

10+
const tag = await isPrereleaseCli() ? '@next' : '';
11+
912
try {
10-
await ng('add', '@angular/material', '--unknown');
13+
await ng('add', `@angular/material${tag}`, '--unknown');
1114
} catch (error) {
1215
if (!(error.message && error.message.includes(`Unknown option: '--unknown'`))) {
1316
throw error;
1417
}
1518
}
1619

17-
await ng('add', '@angular/material', '--theme', 'custom', '--verbose');
20+
await ng('add', `@angular/material${tag}`, '--theme', 'custom', '--verbose');
1821
await expectFileToMatch('package.json', /@angular\/material/);
1922

2023
const output1 = await ng('add', '@angular/material');

0 commit comments

Comments
 (0)