Not actually sure, it is should be done with jest. But how to ensure, that found text on the screen is visible? There are my short files for example: (setted color of text to be same as bg, but it passes)
in text format to you, if you want copy/paste
export default () => (
<SafeAreaView style={ style.container }>
<Text style={ style.text }>loading..</Text>
</SafeAreaView>
)
,
test('In Loading screen, there is "loading" visible label', () => {
const { getByText } = render(
<Loading />
)
getByText(/loading/) // exact 1 (not 0, not >)
})
Aucun commentaire:
Enregistrer un commentaire