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

[icons] Expose a data-testid attribute on all svg icons #22634

Merged
merged 7 commits into from
Sep 18, 2020
Merged

[icons] Expose a data-testid attribute on all svg icons #22634

merged 7 commits into from
Sep 18, 2020

Conversation

jaebradley
Copy link
Contributor

Summary

Closes #22622

Replaces the data-mui-test attribute on icons with a data-testid attribute.

The yarn run test command seemed to pass locally after modifying various assertions that relied on the data-mui-test attribute to instead rely on the data-testid attribute

@mui-pr-bot
Copy link

mui-pr-bot commented Sep 17, 2020

Details of bundle changes

Generated by 🚫 dangerJS against dfa3d8c

Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

The main review is about using getByTestId and getAllByTestId when it's straightforward. I have highlighted a few cases there are more.

packages/material-ui/src/Chip/Chip.test.js Outdated Show resolved Hide resolved
packages/material-ui/src/Chip/Chip.test.js Outdated Show resolved Hide resolved
packages/material-ui/src/Chip/Chip.test.js Outdated Show resolved Hide resolved
packages/material-ui/src/StepIcon/StepIcon.test.js Outdated Show resolved Hide resolved
@jaebradley
Copy link
Contributor Author

@oliviertassinari thanks for the review - did not notice get*ByTestId - will update accordingly

@oliviertassinari oliviertassinari changed the title [icons] Add data-test-id attribute to icons [icons] Expose a data-test-id attribute on all svg icons Sep 18, 2020
@oliviertassinari oliviertassinari merged commit 5a28de7 into mui:next Sep 18, 2020
@oliviertassinari
Copy link
Member

@jaebradley Well done :)

@jaebradley jaebradley deleted the issue-22622-add-data-test-id-attribute-to-create-svg-icon branch September 18, 2020 20:43
@jaebradley
Copy link
Contributor Author

@oliviertassinari thanks for adding the documentation updates!

@oliviertassinari oliviertassinari changed the title [icons] Expose a data-test-id attribute on all svg icons [icons] Expose a data-testid attribute on all svg icons Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: SvgIcon The React component. test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[material-icons] Testing
4 participants