New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: add blocklist for material unit tests #32239
Closed
devversion
wants to merge
1
commit into
angular:master
from
devversion:build/update-blocklist-to-work-with-bazel
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,32 @@ | ||
### Unit tests for Angular CDK/Material | ||
The unit tests from angular/material2 run on CircleCI under the `material-unit-tests` job. | ||
Known failing tests are skipped based on the blocklist in | ||
`tools/material-ci/angular_material_test_blocklist.js`. 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. | ||
|
||
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/material-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 | ||
To debug a failure, you need to work against the angular/material2 repo: | ||
1. Clone `angular/material2` | ||
2. Checkout the `ivy-2019` branch | ||
3. Run `yarn` | ||
4. Run `scripts/ivy/install-angular.sh path/to/local/angular/repo` | ||
5. Run `gulp test` | ||
|
||
### Regenerating the blocklist | ||
If a problem has been fixed, you can regenerate the blocklist by: | ||
1. Clone `angular/material2` | ||
2. Checkout the `ivy-2019` branch | ||
3. Run `yarn` | ||
4. Run `scripts/ivy/install-angular.sh path/to/local/angular/repo` | ||
5. Run `gulp test`. Let it finish. It will take a few minutes. | ||
6. Run `scripts/ivy/generate-blocklist.js path/to/local/angular/repo` | ||
7. Copy the new blocklist from `dist/angular_material_test_blocklist.js` | ||
|
||
Information on debugging can be found [here](../../docs/DEBUG_MATERIAL_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.' | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great idea 👍