Hi I’m trying to test mobile app written in react-native, i choose espresso + java to automate the process because detox has no support for android platform.
Target platform: android
Right now I’m struggling with timeouts in test namely:
usage of simple onView always throws NoMatchingViewException
Thread.sleep causes test to become flaky
the best solution I’ve discovered so far is to use PollingTimeoutIdler from this post,
but it seems to be flaky as well and depends on max timeout provided explicitly and the tests are just too slow.
Another idea was to use componentDidMount() in react to send information about component (if it finished rendering?) to java tests but I don’t know if that’s even possible.
Do you know the best way to write e2e test for react-native?
Maybe espresso is not the tool to use in that case?
Can you please help me ?