Skip to content
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 getByText and queryByText to find text nested in fragments #934

Merged
merged 1 commit into from
Mar 25, 2022

Conversation

pierrezimmermannbam
Copy link
Collaborator

Summary

This fixes the issue #866

There are already two open prs for this issue, #663 and #883 but they seem to be stale.

As suggested in this comment #883 (comment), this implementation modifies getChildrenAsText function and tests for Fragment type.

Test plan

I added several test cases with fragments. It should work as if fragments were not there as far as getByText and queryByText are concerned

Copy link
Collaborator

@AugustinLF AugustinLF 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 to me, exhaustive tests and maintainable implementation. Thanks for removing the useless call to getChildrenAsText.

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

Successfully merging this pull request may close these issues.

3 participants