Skip to content

Instantly share code, notes, and snippets.

@JoseAlcerreca
Last active April 13, 2022 08:53
Show Gist options
  • Save JoseAlcerreca/ff5c1f43fe31f1a55ce462bc214cdc83 to your computer and use it in GitHub Desktop.
Save JoseAlcerreca/ff5c1f43fe31f1a55ce462bc214cdc83 to your computer and use it in GitHub Desktop.
// Copyright 2022 Google LLC.
// SPDX-License-Identifier: Apache-2.0
fun ComposeContentTestRule.waitUntilNodeCount(
matcher: SemanticsMatcher,
count: Int,
timeoutMillis: Long = 1_000L
) {
this.waitUntil(timeoutMillis) {
this.onAllNodes(matcher).fetchSemanticsNodes().size == count
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment