-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(material/testing): MatChipHarness getAvatar #22348
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
feat(material/testing): MatChipHarness getAvatar #22348
Conversation
4132d43
to
fa489fc
Compare
@@ -22,6 +27,11 @@ export class MatChipHarness extends ComponentHarness { | |||
static with<T extends typeof MatChipHarness>(this: T, options: ChipHarnessFilters = {}): | |||
HarnessPredicate<InstanceType<T>> { | |||
return new HarnessPredicate(MatChipHarness, options) | |||
.addOption( | |||
'hasAvatar', | |||
options.hasAvatar, |
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.
Is it that common of a use case to be able to query only chips that have an avatar? We don't have anything similar for the other icons that can be projected (e.g. the remove icon).
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.
it's probably not that common. removed
/** | ||
* Whether the chip has an avatar | ||
*/ | ||
async hasAvatar() { |
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.
I don't think that we need this since it can be inferred from getAvatar
.
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.
right, removed
fa489fc
to
b6614c7
Compare
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.
The changes look good, but the API goldens need to be updated. You can run yarn approve-api chips/testing
to do it.
b6614c7
to
6ec8ed9
Compare
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.
LGTM
6ec8ed9
to
373e5d3
Compare
rebased after conflicts |
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. |
MatChipAvatarHarness
getAvatar
method toMatChipHarness
MatChipHarness
extendContentContainerComponentHarness
MatIconHarness
inside a chip