waitUntilNodeCount

Function
Common
@ExperimentalTestApi
fun ComposeUiTest.waitUntilNodeCount(
    matcher: SemanticsMatcher,
    count: Int,
    timeoutMillis: Long = 1_000L,
)

Blocks until the number of nodes matching the given matcher is equal to the given count.

Parameters

matcher The matcher that will be used to filter nodes.
count The number of nodes that are expected to be matched.
timeoutMillis The time after which this method throws an exception if the number of nodes that match the matcher is not count. This observes wall clock time, not frame time.