Skip to content

Instantly share code, notes, and snippets.

@JoseAlcerreca
Last active March 22, 2023 11:46
Show Gist options
  • Save JoseAlcerreca/902a0c5a06e02a7411c0518c3f997dbf to your computer and use it in GitHub Desktop.
Save JoseAlcerreca/902a0c5a06e02a7411c0518c3f997dbf to your computer and use it in GitHub Desktop.
// Copyright 2022 Google LLC.
// SPDX-License-Identifier: Apache-2.0
// UPDATE: These are not needed anymore.
fun ComposeContentTestRule.waitUntilExists(
matcher: SemanticsMatcher,
timeoutMillis: Long = 1_000L
) {
return this.waitUntilNodeCount(matcher, 1, timeoutMillis)
}
fun ComposeContentTestRule.waitUntilDoesNotExist(
matcher: SemanticsMatcher,
timeoutMillis: Long = 1_000L
) {
return this.waitUntilNodeCount(matcher, 0, timeoutMillis)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment