Skip to content

Fix findByRole() and findAllByRole() type definition to check role name #173

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

Merged

Conversation

shibukawa
Copy link
Contributor

What:

Fix findByRole() and findAllByRole() type definition to check role name as same as upstream @testing-library/dom does.

Why:

Current type definition uses Matcher type this is for jQuery selector.

How:

Switch role name type to ByRoleMatcher that is used in @testing-library/dom.

Checklist:

  • Documentation: N/A
  • Tests
  • Ready to be merged

I confirmed VSCode shows role names in completion word list.

スクリーンショット 2021-02-20 22 09 22

Copy link
Contributor

@NicholasBoll NicholasBoll left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks you!

@NicholasBoll NicholasBoll merged commit 6344133 into testing-library:master Feb 21, 2021
@github-actions
Copy link

🎉 This PR is included in version 7.0.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

@shibukawa shibukawa deleted the pr/role-name-type-definition branch February 22, 2021 01:29
@shibukawa
Copy link
Contributor Author

Thank you for your great product.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants