Why doesn't Google Espresso actually wait for View conditions to become true and instead only checks IdlingResources and AsyncTaks to become idle and tries to find a View by conditions and asserts Matcher conditions? It would be so much easier and more reliable if instead of waiting for the latter Espresso would just continue checking until after the View conditions fulfil.
For example, currently onView(withId(R.id.someView)).check(matches(<some conditions>)) may fail because at a time when IdlingResources and AsyncTaks are idle the View is not there yet and so the check may immediately fail.
I know I could create an IdlingResource to wait for my View conditions but again, why to do this if it could be easily done by default...
Aucun commentaire:
Enregistrer un commentaire