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
feat: allow selecting options by nodes #297
feat: allow selecting options by nodes #297
Conversation
Codecov Report
@@ Coverage Diff @@
## master #297 +/- ##
=======================================
Coverage 98.90% 98.90%
=======================================
Files 1 1
Lines 182 182
Branches 55 56 +1
=======================================
Hits 180 180
Misses 2 2
Continue to review full report at Codecov.
|
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.
Totally reasonable 👍
@all-contributors please add @dougbacelar for code and tests |
I've put up a pull request to add @dougbacelar! 🎉 |
🎉 This PR is included in version 10.4.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Thank you @dougbacelar ! |
This is cool. Thank you @dougbacelar ! |
What:
Allow selection of combobox options by html nodes. e.g.
Why:
Since users don't directly interact with option values, this should allow for testing in a more user-like way.
How:
In addition to checking for the
option.value
string, now it also checks if the node itself is in the given array.Checklist:
Comments:
Ideally, I think
userEvent.selectOptions
should receive option text instead of option values, and warn if it can't find the given option.text.Since that would be a breaking change, I think this PR could be a good first step towards that direction.
Related to: