-
Notifications
You must be signed in to change notification settings - Fork 458
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
Use custom testIdAttribute in getSuggestedQuery #651
Use custom testIdAttribute in getSuggestedQuery #651
Conversation
35705da
to
f72984d
Compare
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 35705da:
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit ddc8dd4:
|
f72984d
to
82c64f5
Compare
Codecov Report
@@ Coverage Diff @@
## master #651 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 24 24
Lines 575 575
Branches 145 145
=========================================
Hits 575 575
Continue to review full report at Codecov.
|
Currently `getSuggestedQuery` always uses `data-testid` to find relevant elements. This change updates it to use the configured `testIdAttribute` if one has been set in the configuration.
82c64f5
to
ddc8dd4
Compare
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.
Super 👍 thanks!
🎉 This PR is included in version 7.16.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What:
Currently
getSuggestedQuery
always usesdata-testid
to find relevantelements. This change updates it to use the configured
testIdAttribute
if one has been set in the configuration. (Thanks to @smeijer for
pointing me in the right direction for a solution.)
Why:
If a user has set
testIdAttribute
suggestions will rungetByTestId
against the wrong elements.How:
There's a new test to verify this behavior and a small change to the suggestions code.
Checklist:
docs site N/A
This does not appear to solve #643 yet, but it's a first step in narrowing down the possible cause.