In our codebase, we implement translation with jsLingui and have code like this:
// trivial implementation of Trans
const Trans = (message) => message;
const Component = () => (
<Text>
<Trans>There was a problem fetching data.</Trans>
</Text>
)
Trans would render a string.
Previously, getByText("There was a problem fetching data.") would return a match and it no longer does
getByText("There was a problem fetching data.") should return a match
See above
debug() would render
<Text>
There was a problem fetching data.
</Text>
npmPackages:
@testing-library/react-native: ^7.0.2 => 7.0.2
react: 16.11.0 => 16.11.0
react-native: 0.62.2 => 0.62.2
react-test-renderer: 16.11.0 => 16.11.0
This should definitely pass. cc @AugustinLF working on this field
Yep, there's some changes incoming to the way we find text in the rendered component. This use case _should_ be covered, I also feel that it was already covered. Would you mind having a look at #554 and see if it works for your use case?
Yep, there's some changes incoming to the way we find text in the rendered component. This use case _should_ be covered, I also feel that it was already covered. Would you mind having a look at #554 and see if it works for your use case?
@AugustinLF , thanks for the response. I will try today and report back
Experiencing this as well with react-intl
We are possibly experiencing this as well. We are using i18n-js and expo-localization. We are on react-native v0.63.3.
Most helpful comment
Experiencing this as well with react-intl