Skip to content

Commit

Permalink
Remove waitForLayout
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensousa committed May 30, 2024
1 parent 84aa786 commit 4b26cca
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,22 +186,6 @@ fun waitForIdleScrollState(id: Int = R.id.recyclerView) {
Espresso.onView(withId(id)).perform(DpadRecyclerViewActions.waitForIdleScroll())
}

fun waitForLayout() {
var completedLayout = false
onRecyclerView("Add listener") { recyclerView ->
recyclerView.addOnLayoutCompletedListener(object :
DpadRecyclerView.OnLayoutCompletedListener {
override fun onLayoutCompleted(state: RecyclerView.State) {
completedLayout = true
}
})
}
waitForCondition("Waiting for layout") { recyclerView ->
!recyclerView.isLayoutRequested && completedLayout
}
}


fun waitForAdapterUpdate(id: Int = R.id.recyclerView) {
Espresso.onView(withId(id)).perform(DpadRecyclerViewActions.waitForAdapterUpdate())
}
Expand Down

0 comments on commit 4b26cca

Please sign in to comment.