ci: rename material-unit-tests
job to components-repo-unit-tests
(#34898)
We rename the `material-unit-tests` job to `components-repo-unit-tests` because the job runs all unit tests found in the Angular Components repository. This includes the Angular CDK, Angular Material and more. Also the repository has been renamed from `angular/material2` to `angular/components` in the past. PR Close #34898
This commit is contained in:

committed by
Andrew Kushnir

parent
3049878aa9
commit
fa4ea34401
32
tools/components-repo-ci/instructions.md
Normal file
32
tools/components-repo-ci/instructions.md
Normal file
@ -0,0 +1,32 @@
|
||||
### Unit tests for `angular/components`
|
||||
|
||||
Currently, all changes to Ivy are validated against the test suite of the
|
||||
`angular/components` repository. Known failing tests are skipped based on
|
||||
the blocklist in `tools/components-repo-ci/test-blocklist.ts`.
|
||||
|
||||
Whenever the root cause of a known failure is identified, the `notes` field
|
||||
for the corresponding tests should be updated. Whenever a failure is resolved,
|
||||
the corresponding tests should be removed from the blocklist.
|
||||
|
||||
### Debugging
|
||||
|
||||
Information on debugging can be found [here](../../docs/DEBUG_COMPONENTS_REPO_IVY.md).
|
||||
|
||||
### Excluding new tests
|
||||
|
||||
In case there are any tests in the components test suite that fail due to
|
||||
recent changes in the framework and you want to exclude the tests temporarily,
|
||||
a new entry can be added to the `test-blocklist.ts` file.
|
||||
|
||||
Each property in the blocklist object corresponds to a test in the components
|
||||
repository. The name of the property **must** match the exact test name. Additionally
|
||||
it's **recommended** that every entry has a field with a note on why the test is disabled.
|
||||
|
||||
```ts
|
||||
export const testBlocklist: any = {
|
||||
'MatSlider should be able to drag thumb': {
|
||||
error: 'Cannot register event "dragstart".',
|
||||
notes: 'Breaking change where HammerJS module needs to be imported.'
|
||||
}
|
||||
}
|
||||
```
|
29
tools/components-repo-ci/test-blocklist.ts
Normal file
29
tools/components-repo-ci/test-blocklist.ts
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// clang-format off
|
||||
// tslint:disable
|
||||
|
||||
interface BlocklistEntry {
|
||||
/** Description on why the given test is disabled. */
|
||||
notes: string;
|
||||
/** Optional error that has been thrown in the test. */
|
||||
error?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* List of tests that should not run in the Angular component test suites. This should
|
||||
* be empty in the components repository, but the file will be overwritten if the framework
|
||||
* repository runs the Angular component test suites against the latest snapshots. This is
|
||||
* helpful because sometimes breaking changes that break individual tests land in the framework
|
||||
* repository. It should be possible to disable these tests until the component repository
|
||||
* migrated the broken tests.
|
||||
*/
|
||||
export const testBlocklist: {[testName: string]: BlocklistEntry} = {};
|
||||
|
||||
// clang-format on
|
Reference in New Issue
Block a user