mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-03-17 19:58:57 +03:00
making all waitForViews have an initial 100ms wait this completely removed the flakyness when running the tests on my emulator
This commit is contained in:
parent
f08d3965c1
commit
d2aec09b5b
1 changed files with 4 additions and 0 deletions
|
@ -70,6 +70,8 @@ fun waitForView(viewMatcher: Matcher<View>, 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<View>, timeout: Long = 10_000, waitForDispl
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
fun initialSyncIdlingResource(session: Session): IdlingResource {
|
||||
val res = object : IdlingResource, Observer<SyncState> {
|
||||
private var callback: IdlingResource.ResourceCallback? = null
|
||||
|
|
Loading…
Add table
Reference in a new issue