-
Notifications
You must be signed in to change notification settings - Fork 274
Add queryOptions to labelText and hintText #1193
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
Add queryOptions to labelText and hintText #1193
Conversation
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.
Could you please add tests? See https://github.com/callstack/react-native-testing-library/blob/main/src/queries/__tests__/text.test.tsx#L293 for how we tested TextMatch options
Have added the tests @AugustinLF Some label text tests are still failing though. Will appreciate some help there as well, thanks. |
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.
@ShaswatPrabhat looks good, pls also update documentation in Queries.md
@ShaswatPrabhat looks like there are some CircleCI issues. Are the tests are passing locally on your machine? |
Some tests for Label are failing even on my local @mdjastrzebski, hence needed help. Wondering what I did wrong for the tests to start failing. Seems after my change it is not picking labels from all 3 components: Please find screenshot of the failure below: |
The earlier matchStringProp method: return prop.match(matcher) != null; But the matches.ts method: return matcher.test(normalizedText); And hence the delta. |
I've fixed the failing tests. There was a rather obscure bug connected with the fact that Happy that you stumbled upon it, because it could impact our other queries as well 🎉 |
@mdjastrzebski Thank you. Is it good to merge the changes ? |
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.
You also need to update the flow types :)
Apart from that and my other comment, looks good to me.
Have pushed some changes for both observations @AugustinLF . Please have a look whenever possible. Thanks. |
Since |
f126b50
to
9252947
Compare
Codecov ReportBase: 93.90% // Head: 94.04% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1193 +/- ##
==========================================
+ Coverage 93.90% 94.04% +0.14%
==========================================
Files 41 41
Lines 2706 2773 +67
Branches 410 418 +8
==========================================
+ Hits 2541 2608 +67
Misses 165 165
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View 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.
Looks good for me!
@ShaswatPrabhat I've added hacktoberfest-accepted
tag to mark it eligible for hacktoberfest despite not being merged yet.
@AugustinLF could you take a look if everything is fine for you?
Seems like we still need to update docs |
I've updated docs |
Changes for PR