waitUntilExactlyOneExists

Function

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

Blocks until exactly one node matches the given matcher.

Parameters

matcherThe matcher that will be used to filter nodes.
timeoutMillisThe time after which this method throws an exception if exactly one node does not match the given matcher. This observes wall clock time, not frame time.