docs: add typedefs for queries - #1175
Merged
Merged
Conversation
mdjastrzebski
requested review from
AugustinLF,
pierrezimmermannbam and
thymikee
October 15, 2022 21:43
pierrezimmermannbam
approved these changes
Oct 16, 2022
pierrezimmermannbam
left a comment
Collaborator
There was a problem hiding this comment.
Great improvement !
|
|
||
| Returns a `ReactTestInstance` with matching text – may be a string or regular expression. | ||
|
|
||
| This method will join `<Text>` siblings to find matches, similarly to [how React Native handles these components](https://reactnative.dev/docs/text#containers). This will allow for querying for strings that will be visually rendered together, but may be semantically separate React components. |
Collaborator
There was a problem hiding this comment.
This is not related to this pr but isn't this false now ? If I'm correct byText queries do not match text rendered in several components
Member
Author
There was a problem hiding this comment.
I think you are right, we should revisit our *ByText handling in a separate issue/PR, as there are some things worth discussing, e.g. should we match text spread between different child Text instance, compat with Jest Native, compat with RTL behaviour
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Improve documentation by adding expanded type definitions for all queries. This should make our query docs easier to understand. In line with DTL docs, I provided only typedef for
getByvariant.Test plan
None.