-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[StepButton] Fix prop-types warning regarding expanded
#19332
Conversation
getAllByTestId('props').forEach(child => { | ||
// HTMLElement.dataset is a DOMStringMap which fails deep.equal | ||
const datasetAsObject = { ...child.dataset }; | ||
expect(datasetAsObject).to.deep.equal({ |
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.
Using deep equality over (previous) subset checking. This helps exposing all props that children might receive.
|
||
describe('event handlers', () => { | ||
describe('handleMouseEnter/Leave', () => { |
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.
This handles the same as the "should bubble callbacks used internally" test whose description is misleading. It never tested bubbling as far as I can tell.
assert.strictEqual(handleTouchStart.callCount, 2); | ||
const button = getByRole('button'); | ||
|
||
fireEvent.mouseOver(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.
Something about mouseenter vs mouseover. Need a refresher what the difference is and how react handles those.
Details of bundle changes.Comparing: 2082679...6b0fbb5
|
bdb59b3
to
6b0fbb5
Compare
👌 |
Fixes
when using
<Step><StepButton /></Step>
which is used in our docs.Used this opportunity to convert Step and StepButton to testing-library where possible.
Includes a fix forTouchRipple
that will be handled in a different PR.