Skip to content

Fix translations text not being found by getByText - #967

Closed
pierrezimmermannbam wants to merge 1 commit into
callstack:mainfrom
pierrezimmermannbam:fix/trads
Closed

Fix translations text not being found by getByText#967
pierrezimmermannbam wants to merge 1 commit into
callstack:mainfrom
pierrezimmermannbam:fix/trads

Conversation

@pierrezimmermannbam

Copy link
Copy Markdown
Collaborator

Summary

Pr is still a draft. Fixes #937

Test plan

@pierrezimmermannbam
pierrezimmermannbam marked this pull request as draft May 1, 2022 19:42
@pierrezimmermannbam pierrezimmermannbam changed the title chore: make queries by text based on the tree Fix translations text not being found by getByText May 1, 2022
@mdjastrzebski

Copy link
Copy Markdown
Member

This issue is related to architecture discussion in #972.

ReactTestRendererNode seems to be better suited for handling text related stuff, but otherwise we rely on ReactTestInstance it would be great to have an easy way of getting ReactTestRendererNode from ReactTestInstance. It seems that React Test Renderer source has such function but unfortunately it is not exported and we are limited to calling toJSON on ReactTestRenderer instance.

@mdjastrzebski

Copy link
Copy Markdown
Member

Closing as changes contained it the PR would break other features of RNTL.

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.

Error: Unable to find an element with text: "My text", while that text exist.

2 participants