build(docs-infra): switch the docs examples to Ivy and run unit tests for specific examples on CI#36143
build(docs-infra): switch the docs examples to Ivy and run unit tests for specific examples on CI#36143gkalpak wants to merge 4 commits intoangular:masterfrom
Conversation
|
You can preview f998038 at https://pr36143-f998038.ngbuilds.io/. |
|
Oh and the 2nd commit has a typo:
|
f998038 to
6849e1b
Compare
|
You can preview 6849e1b at https://pr36143-6849e1b.ngbuilds.io/. |
|
You can preview 9689940 at https://pr36143-9689940.ngbuilds.io/. |
9689940 to
4876279
Compare
|
You can preview 4876279 at https://pr36143-4876279.ngbuilds.io/. |
4876279 to
b5f3156
Compare
|
@gkalpak The merge script is running into merge conflicts on master for some reason. Can you rebase to see if that helps? |
The docs examples are switched to Ivy. On CI, the tests are run with both Ivy and ViewEngine. Partially addresses: [FW-1609](https://angular-team.atlassian.net/browse/FW-1609)
…les on CI Previously, only e2e tests were run for docs examples on CI. As a result, unit tests (which are included in the zipped archives we provide for users to download and play with the examples locally) were often outdated and broken. This commit configures specific docs examples that have meaningful unit tests to run them on CI (via the `run-example-e2e.js` script). Where necessary, the unit tests are fixed to ensure they pass and reflect the changes in the corresponding component/service. This commit also removes some auto-generated unit tests that are not meaningful (e.g. make trivial assertions, such that a component instance is truthy) and are often broken anyway (e.g. because the corresponding component has been changed in ways that make the tests fail).
…`core-js` The `core-js` dependency is no longer included in `package.json` for `cli`-type examples, but only for the `systemjs` ones. This commit updates the `package.json` templates to reflect that (and also updates the `npm-packages` guide accordingly).
… `tests` Each docs example has an `example-config.json` configuration file. Among other things, this file can be used to specify what commands to run in order to test the example. (If not specified, the `run-example-e2e.js` script will run a default `yarn e2e` command.) Previously, the property specifying the test commands was called `e2e`. This is because in the past only e2e tests were run for docs examples. Since recently, some examples may specify commands for other types of tests (such as unit tests). Therefore, calling the property that holds the list of test commands `e2e` no longer makes sense and can be misleading to people looking at the configuration files. This commit renamed the property to the more generic `tests`. In the future, the `run-example-e2e.js` script (and corresponding npm script) should be renamed and refactored to also avoid giving the impression that only e2e tests are run. Discussed in: angular#36143 (comment)
b5f3156 to
29ace22
Compare
…les on CI (#36143) Previously, only e2e tests were run for docs examples on CI. As a result, unit tests (which are included in the zipped archives we provide for users to download and play with the examples locally) were often outdated and broken. This commit configures specific docs examples that have meaningful unit tests to run them on CI (via the `run-example-e2e.js` script). Where necessary, the unit tests are fixed to ensure they pass and reflect the changes in the corresponding component/service. This commit also removes some auto-generated unit tests that are not meaningful (e.g. make trivial assertions, such that a component instance is truthy) and are often broken anyway (e.g. because the corresponding component has been changed in ways that make the tests fail). PR Close #36143
… `tests` (#36143) Each docs example has an `example-config.json` configuration file. Among other things, this file can be used to specify what commands to run in order to test the example. (If not specified, the `run-example-e2e.js` script will run a default `yarn e2e` command.) Previously, the property specifying the test commands was called `e2e`. This is because in the past only e2e tests were run for docs examples. Since recently, some examples may specify commands for other types of tests (such as unit tests). Therefore, calling the property that holds the list of test commands `e2e` no longer makes sense and can be misleading to people looking at the configuration files. This commit renamed the property to the more generic `tests`. In the future, the `run-example-e2e.js` script (and corresponding npm script) should be renamed and refactored to also avoid giving the impression that only e2e tests are run. Discussed in: #36143 (comment) PR Close #36143
The docs examples are switched to Ivy. On CI, the tests are run with both Ivy and ViewEngine. Partially addresses: [FW-1609](https://angular-team.atlassian.net/browse/FW-1609) PR Close #36143
…les on CI (#36143) Previously, only e2e tests were run for docs examples on CI. As a result, unit tests (which are included in the zipped archives we provide for users to download and play with the examples locally) were often outdated and broken. This commit configures specific docs examples that have meaningful unit tests to run them on CI (via the `run-example-e2e.js` script). Where necessary, the unit tests are fixed to ensure they pass and reflect the changes in the corresponding component/service. This commit also removes some auto-generated unit tests that are not meaningful (e.g. make trivial assertions, such that a component instance is truthy) and are often broken anyway (e.g. because the corresponding component has been changed in ways that make the tests fail). PR Close #36143
… `tests` (#36143) Each docs example has an `example-config.json` configuration file. Among other things, this file can be used to specify what commands to run in order to test the example. (If not specified, the `run-example-e2e.js` script will run a default `yarn e2e` command.) Previously, the property specifying the test commands was called `e2e`. This is because in the past only e2e tests were run for docs examples. Since recently, some examples may specify commands for other types of tests (such as unit tests). Therefore, calling the property that holds the list of test commands `e2e` no longer makes sense and can be misleading to people looking at the configuration files. This commit renamed the property to the more generic `tests`. In the future, the `run-example-e2e.js` script (and corresponding npm script) should be renamed and refactored to also avoid giving the impression that only e2e tests are run. Discussed in: #36143 (comment) PR Close #36143
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This PR switches the docs examples to Ivy (from ViewEngine) and also sets up unit tests for specific docs examples to run on CI. See individual commits for more details.
This was originally part of #34374 (and split off for easier reviewing).
Partially addresses: FW-1609