-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(material/testing): MatChipHarness getAvatar (#22348)
- Loading branch information
1 parent
71d75f4
commit d733ee2
Showing
12 changed files
with
173 additions
and
21 deletions.
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
25 changes: 25 additions & 0 deletions
25
src/material-experimental/mdc-chips/testing/chip-avatar-harness.ts
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,25 @@ | ||
/** | ||
* @license | ||
* Copyright Google LLC 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 | ||
*/ | ||
|
||
import {HarnessPredicate, ComponentHarness} from '@angular/cdk/testing'; | ||
import {ChipAvatarHarnessFilters} from './chip-harness-filters'; | ||
|
||
/** Harness for interacting with a standard Material chip avatar in tests. */ | ||
export class MatChipAvatarHarness extends ComponentHarness { | ||
static hostSelector = '.mat-mdc-chip-avatar'; | ||
|
||
/** | ||
* Gets a `HarnessPredicate` that can be used to search for a `MatChipAvatarHarness` that meets | ||
* certain criteria. | ||
* @param options Options for filtering which input instances are considered a match. | ||
* @return a `HarnessPredicate` configured with the given options. | ||
*/ | ||
static with(options: ChipAvatarHarnessFilters = {}): HarnessPredicate<MatChipAvatarHarness> { | ||
return new HarnessPredicate(MatChipAvatarHarness, options); | ||
} | ||
} |
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 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 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 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 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,25 @@ | ||
/** | ||
* @license | ||
* Copyright Google LLC 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 | ||
*/ | ||
|
||
import {HarnessPredicate, ComponentHarness} from '@angular/cdk/testing'; | ||
import {ChipAvatarHarnessFilters} from './chip-harness-filters'; | ||
|
||
/** Harness for interacting with a standard Material chip avatar in tests. */ | ||
export class MatChipAvatarHarness extends ComponentHarness { | ||
static hostSelector = '.mat-chip-avatar'; | ||
|
||
/** | ||
* Gets a `HarnessPredicate` that can be used to search for a `MatChipAvatarHarness` that meets | ||
* certain criteria. | ||
* @param options Options for filtering which input instances are considered a match. | ||
* @return a `HarnessPredicate` configured with the given options. | ||
*/ | ||
static with(options: ChipAvatarHarnessFilters = {}): HarnessPredicate<MatChipAvatarHarness> { | ||
return new HarnessPredicate(MatChipAvatarHarness, options); | ||
} | ||
} |
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 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 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 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 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