-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(cdk/testing): make MatButtonHarness extend ContentContainerCompo… #20653
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(cdk/testing): make MatButtonHarness extend ContentContainerCompo… #20653
Conversation
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, but needs an update to the API goldens.
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, just the one comment
<button id="home-icon" type="button" mat-icon-button> | ||
<mat-icon>home</mat-icon> | ||
</button> | ||
<button id="favorite-icon" type="button" mat-icon-button> | ||
<mat-icon>favorite</mat-icon> | ||
</button> |
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.
Shouldn't one of these test cases remain as a mat-icon-button
without a mat-icon
element inside?
<button id="home-icon" type="button" mat-icon-button> | |
<mat-icon>home</mat-icon> | |
</button> | |
<button id="favorite-icon" type="button" mat-icon-button> | |
<mat-icon>favorite</mat-icon> | |
</button> | |
<button id="home-icon" type="button" mat-icon-button> | |
<mat-icon>home</mat-icon> | |
</button> | |
<button id="favorite-icon" type="button" mat-icon-button>favorite</button> |
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 wanted to have two mat-icon-buttons
with mat-icons
inside so that we could make sure that the correct mat-icon
was being returned.
Also, the mat-icon
with text in it was being used for any tests. @mmalerba What are your thoughts here?
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 think the icon button with text in it was just a sloppy previously written test. I'm good with these changes
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
Note for a followup: once #20646 goes in we might as well tighten it up so we're looking under the element where the content is projected |
8e10729
to
4695702
Compare
…nentHarness * Allows users to access mat-icons within mat-buttons
4695702
to
4f38868
Compare
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. |
…nentHarness