-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
fix(icon-button): update event handling to new standard #3165
Conversation
@@ -61,18 +61,10 @@ class MDCIconButtonToggleFoundation extends MDCFoundation { | |||
|
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
const {foundation, mockAdapter} = setupTest(); | ||
foundation.init(); | ||
foundation.handleClick(); | ||
td.verify(mockAdapter.setAttr('aria-pressed', 'true'), {times: 1}); |
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 this should verify that foundation.toggle()
was called. The aria-pressed is verified in another test.
🤖 Beep boop! Screenshot test reportCommit 3e9b8d0 vs. No diffs! 💯🎉 |
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.
Also remove registerInteractionHandler
/deregisterInteractionHandler
from adapter.js
. Otherwise LGTM!
🤖 Beep boop! Screenshot test reportCommit 6cc8985 vs. No diffs! 💯🎉 |
🤖 Beep boop! Screenshot test reportCommit c36f23a vs. No diffs! 💯🎉 |
🤖 Beep boop! Screenshot test reportCommit 12ed874 vs. No diffs! 💯🎉 |
…aterial-components/material-components-web into fix/icon-button/event-handler-standard
🤖 Beep boop! Screenshot test reportCommit ad47552 vs. No diffs! 💯🎉 |
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.
[de]registerInteractionHandler are still in the readme and should be removed
td.verify(component.foundation_.handleClick(), {times: 1}); | ||
}); | ||
|
||
test('keydown handler is removed from the root element on destroy', () => { |
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.
keydown -> click
🤖 Beep boop! Screenshot test reportCommit 6f13d36 vs. No diffs! 💯🎉 |
🤖 Beep boop! Screenshot test reportCommit 4facd12 vs. No diffs! 💯🎉 |
🤖 Beep boop! Screenshot test reportCommit c1c1d38 vs. No diffs! 💯🎉 |
All 128 screenshot tests passed for commit c2e55bf vs. |
…aterial-components/material-components-web into fix/icon-button/event-handler-standard
Codecov Report
@@ Coverage Diff @@
## master #3165 +/- ##
==========================================
- Coverage 98.12% 98.12% -0.01%
==========================================
Files 101 101
Lines 4426 4421 -5
Branches 585 585
==========================================
- Hits 4343 4338 -5
Misses 83 83
Continue to review full report at Codecov.
|
All 128 screenshot tests passed for commit 6e8fd5d vs. |
All 128 screenshot tests passed for commit f937f13 vs. |
All 128 screenshot tests passed for commit a395dd6 vs. |
All 128 screenshot tests passed for commit a1ff5ac vs. |
All 128 screenshot tests passed for commit 44d35e7 vs. |
….com:material-components/material-components-web into fix/icon-button/event-handler-standard
All 128 screenshot tests passed for commit db77f72 vs. |
All 128 screenshot tests passed for commit 9079594 vs. |
fixes #3162