diff --git a/vector/src/androidTest/java/im/vector/app/EspressoExt.kt b/vector/src/androidTest/java/im/vector/app/EspressoExt.kt index 823ce83015..3890ef8ad7 100644 --- a/vector/src/androidTest/java/im/vector/app/EspressoExt.kt +++ b/vector/src/androidTest/java/im/vector/app/EspressoExt.kt @@ -70,6 +70,8 @@ fun waitForView(viewMatcher: Matcher, timeout: Long = 10_000, waitForDispl val endTime = startTime + timeout val visibleMatcher = isDisplayed() + uiController.loopMainThreadForAtLeast(100) + do { println("*** waitForView loop $view end:$endTime current:${System.currentTimeMillis()}") val viewVisible = TreeIterables.breadthFirstViewTraversal(view) @@ -93,6 +95,8 @@ fun waitForView(viewMatcher: Matcher, timeout: Long = 10_000, waitForDispl } } + + fun initialSyncIdlingResource(session: Session): IdlingResource { val res = object : IdlingResource, Observer { private var callback: IdlingResource.ResourceCallback? = null