-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
refactor(react): update OverflowMenu and OverflowMenuItem tests to use RTL #11867
refactor(react): update OverflowMenu and OverflowMenuItem tests to use RTL #11867
Conversation
✅ Deploy Preview for carbon-components-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site settings. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
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.
Thanks for adding all the extra coverage for OverflowMenuItem! One minor suggestion, but LGTM
expect(container.firstChild).toHaveClass( | ||
'cds--overflow-menu-options__option--disabled' | ||
); |
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.
Minor expansion on the coverage here since it also disables the child of the li
expect(container.firstChild).toHaveClass( | |
'cds--overflow-menu-options__option--disabled' | |
); | |
expect(container.firstChild).toHaveClass( | |
'cds--overflow-menu-options__option--disabled' | |
); | |
expect(container.firstChild.firstChild).toHaveProperty('disabled', true); |
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.
Good suggestion! Added :)
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 👍 ✅
@abbeyhrt I'll let you add the merge label in case you want to take further action on Taylor's suggestion |
Closes #11730
Closes #11732
This PR updates
OverflowMenu
andOverflowMenuItem
tests to use RTL.Changelog
New
Changed
Removed
Testing / Reviewing
Verify that tests pass and that the component API is properly tested.