Skip to content

Commit 11822d9

Browse files
clydinhansl
authored andcommitted
test: update E2E update tests to use built packages
1 parent 9a79349 commit 11822d9

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createProjectFromAsset } from '../../utils/assets';
2-
import { ng } from '../../utils/process';
3-
import { useCIChrome, useCIDefaults } from '../../utils/project';
2+
import { ng, silentNpm } from '../../utils/process';
3+
import { useBuiltPackages, useCIChrome, useCIDefaults } from '../../utils/project';
44
import { expectToFail } from '../../utils/utils';
55

66

@@ -10,10 +10,13 @@ export default function () {
1010
.then(() => useCIChrome('.'))
1111
.then(() => expectToFail(() => ng('build')))
1212
.then(() => ng('update', '@angular/cli'))
13+
.then(() => useBuiltPackages())
14+
.then(() => silentNpm('install'))
1315
.then(() => useCIDefaults('one-oh-project'))
1416
.then(() => ng('generate', 'component', 'my-comp'))
1517
.then(() => ng('test', '--watch=false'))
1618
.then(() => ng('lint'))
19+
.then(() => ng('build'))
1720
.then(() => ng('build', '--prod'))
1821
.then(() => ng('e2e'));
1922
}
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
import { createProjectFromAsset } from '../../utils/assets';
2+
import { ng, silentNpm } from '../../utils/process';
3+
import { useBuiltPackages } from '../../utils/project';
24
import { expectToFail } from '../../utils/utils';
3-
import { ng } from '../../utils/process';
45

56

67
export default function () {
78
return Promise.resolve()
89
.then(() => createProjectFromAsset('1.7-project'))
910
.then(() => expectToFail(() => ng('build')))
1011
.then(() => ng('update', '@angular/cli', '--migrate-only', '--from=1.7.1'))
12+
.then(() => useBuiltPackages())
13+
.then(() => silentNpm('install'))
1114
.then(() => ng('build'));
1215
}

tests/legacy-cli/e2e/tests/basic/update-1.7.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createProjectFromAsset } from '../../utils/assets';
2-
import { ng } from '../../utils/process';
3-
import { useCIChrome, useCIDefaults } from '../../utils/project';
2+
import { ng, silentNpm } from '../../utils/process';
3+
import { useBuiltPackages, useCIChrome, useCIDefaults } from '../../utils/project';
44
import { expectToFail } from '../../utils/utils';
55

66

@@ -10,6 +10,8 @@ export default function () {
1010
.then(() => useCIChrome('.'))
1111
.then(() => expectToFail(() => ng('build')))
1212
.then(() => ng('update', '@angular/cli'))
13+
.then(() => useBuiltPackages())
14+
.then(() => silentNpm('install'))
1315
.then(() => useCIDefaults('latest-project'))
1416
.then(() => ng('generate', 'component', 'my-comp'))
1517
.then(() => ng('test', '--watch=false'))

0 commit comments

Comments
 (0)