You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ci: Add back the CLI integration test with pinning (angular#21555)
The CLI app is now checked in, rather than generated dynamically with
`ng new`. This loses some assertion power, but gains hermeticity.
It also checks in lock files for all integration tests, avoiding
floating version numbers.
We'll need another place to integration test between changes in
the various repositories - but the angular/angular PR-blocking status
is not the right place to do this.
PR Closeangular#21555
Copy file name to clipboardexpand all lines: integration/README.md
+21-6
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,24 @@
1
1
# Integration tests for Angular
2
2
3
-
This directory contains end-to-end tests for Angular. Each directory is a self-contained
4
-
application that exactly mimics how a user might expect Angular to work, so they allow
5
-
high-fidelity reproductions of real-world issues.
6
-
7
-
For this to work, we first build the Angular distribution just like we would publish
8
-
it to npm, then install the distribution into each app.
3
+
This directory contains end-to-end tests for Angular. Each directory is a self-contained application that exactly mimics how a user might expect Angular
4
+
to work, so they allow high-fidelity reproductions of real-world issues.
5
+
6
+
For this to work, we first build the Angular distribution just like we would
7
+
publish it to npm, then install the distribution into each app.
8
+
9
+
To test Angular CLI applications, we generate integration tests such as `cli-hello-world`.
10
+
This was generated with a current version of the CLI, and the only modification was replacement of `@angular/*` packages with their counterparts coming from `file:../../dist/packages-dist/*`.
11
+
When a significant change is released in the CLI, the application should be re-generated from scratch:
12
+
13
+
```bash
14
+
$ cd integration
15
+
$ rm -rf cli-hello-world
16
+
$ ng new cli-hello-world
17
+
# Edit cli-hello-world/package.json to point the @angular packages to dist/packages-dist, and preserve local mods to
18
+
# ng build
19
+
# ng test
20
+
# typescript version
21
+
```
9
22
10
23
## Writing an integration test
11
24
@@ -29,6 +42,8 @@ you can install the package directly from `file:../../node_modules`.
29
42
30
43
## Running integration tests
31
44
45
+
First you must run `build.sh` to create the current distribution.
46
+
32
47
You can iterate on the tests by keeping the dist folder up-to-date.
33
48
See the `package.json` of the test(s) you're debugging, to see which dist/ folders they install from.
34
49
Then run the right `tsc --watch` command to keep those dist folders up-to-date, for example:
0 commit comments