Skip to content
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

Merged
merged 5 commits into from
Aug 2, 2022

Conversation

abbeyhrt
Copy link
Contributor

Closes #11730
Closes #11732

This PR updates OverflowMenu and OverflowMenuItem tests to use RTL.

Changelog

New

  • {{new thing}}

Changed

  • {{change thing}}

Removed

  • {{removed thing}}

Testing / Reviewing

Verify that tests pass and that the component API is properly tested.

@abbeyhrt abbeyhrt requested a review from a team as a code owner July 26, 2022 22:16
@abbeyhrt abbeyhrt requested review from tay1orjones and tw15egan July 26, 2022 22:16
@netlify
Copy link

netlify bot commented Jul 26, 2022

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit c3e1054
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/62e841f2be6efc0008d9427c
😎 Deploy Preview https://deploy-preview-11867--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Jul 26, 2022

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit c3e1054
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/62e841f2cd8d560008c743e7
😎 Deploy Preview https://deploy-preview-11867--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@tay1orjones tay1orjones left a 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

Comment on lines +97 to +99
expect(container.firstChild).toHaveClass(
'cds--overflow-menu-options__option--disabled'
);
Copy link
Member

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

Suggested change
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);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good suggestion! Added :)

Copy link
Collaborator

@tw15egan tw15egan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 ✅

@tw15egan
Copy link
Collaborator

tw15egan commented Aug 1, 2022

@abbeyhrt I'll let you add the merge label in case you want to take further action on Taylor's suggestion

@tw15egan tw15egan merged commit 5c32e3d into carbon-design-system:main Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
3 participants