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

waitUntilNodeCount

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

waitUntilNodeCount

Source set: Common
@Deprecated(
    message = "Replaced with same function, but with useUnmergedTree",
    level = DeprecationLevel.HIDDEN,
)
public 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.

Throws: androidx.compose.ui.test.ComposeTimeoutException

If the number of nodes that match the matcher is not count after timeoutMillis (in wall clock time).

waitUntilNodeCount

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

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.
useUnmergedTree If true, searches the unmerged semantics tree instead of the merged semantics tree.

Throws: androidx.compose.ui.test.ComposeTimeoutException

If the number of nodes that match the matcher is not count after timeoutMillis (in wall clock time).