🌈 Create new beautiful Compose Gradients with our new wesite ->
Function

waitUntilExactlyOneExists

Blocks until exactly one node matches the given matcher.

waitUntilExactlyOneExists

Source set: Common
@Deprecated(
    message = "Replaced with same function, but with useUnmergedTree",
    level = DeprecationLevel.HIDDEN,
)
public fun ComposeUiTest.waitUntilExactlyOneExists(
    matcher: SemanticsMatcher,
    timeoutMillis: Long = 1_000L,
): Unit

Blocks until exactly one node matches the given matcher.

Parameters

matcher The matcher that will be used to filter nodes.
timeoutMillis The 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.

Throws: androidx.compose.ui.test.ComposeTimeoutException

If exactly one node does not match the given matcher after timeoutMillis (in wall clock time).

waitUntilExactlyOneExists

Source set: Common
public fun ComposeUiTest.waitUntilExactlyOneExists(
    matcher: SemanticsMatcher,
    timeoutMillis: Long = 1_000L,
    useUnmergedTree: Boolean = false,
): Unit

Blocks until exactly one node matches the given matcher.

Parameters

matcher The matcher that will be used to filter nodes.
timeoutMillis The 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.
useUnmergedTree If true, searches the unmerged semantics tree instead of the merged semantics tree.

Throws: androidx.compose.ui.test.ComposeTimeoutException

If exactly one node does not match the given matcher after timeoutMillis (in wall clock time).