I would like to simply block the instrumentation (test) thread until Espresso is idle.
fun test(){
// do some stuff
Espresso.waitForIdle()
// do some more stuff once Espresso reports that the application is idle
}
What's the best way to do this?
note: Espresso.waitForIdle() is a method I made up