Skip to content

Commit

Permalink
test: use correct version of material
Browse files Browse the repository at this point in the history
Previously, the latest version was being installed which caused E2E to fail.
  • Loading branch information
alan-agius4 authored and clydin committed Jul 20, 2022
1 parent 4d723ca commit ed08d83
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/legacy-cli/e2e/tests/build/material.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { SemVer } from 'semver';
import { getGlobalVariable } from '../../utils/env';
import { replaceInFile } from '../../utils/fs';
import { installPackage, installWorkspacePackages } from '../../utils/packages';
import { ng } from '../../utils/process';
import { isPrereleaseCli, updateJsonFile } from '../../utils/project';
import { readNgVersion } from '../../utils/version';

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

export default async function () {
const tag = await isPrereleaseCli() ? '@next' : '';
const tag = (await isPrereleaseCli()) ? '@next' : `@${new SemVer(readNgVersion()).major}`;
await ng('add', `@angular/material${tag}`, '--skip-confirmation');

const isSnapshotBuild = getGlobalVariable('argv')['ng-snapshots'];
Expand All @@ -28,7 +30,7 @@ export default async function () {

await installWorkspacePackages();
} else {
await installPackage('@angular/material-moment-adapter');
await installPackage(`@angular/material-moment-adapter${tag}`);
}

await installPackage('moment');
Expand Down

0 comments on commit ed08d83

Please sign in to comment.