DejavuComposeTestRule

A test rule that wraps AndroidComposeTestRule with automatic Dejavu lifecycle management. Enables Dejavu and resets recomposition counts before each test, so no @Before boilerplate is needed.

Constructors

Link copied to clipboard

Properties

Link copied to clipboard
val activity: A

Provides access to the underlying activity instance.

Link copied to clipboard
open override val density: Density
Link copied to clipboard
open override val mainClock: MainTestClock

Functions

Link copied to clipboard
open override fun apply(base: Statement, description: Description): Statement
Link copied to clipboard
open suspend override fun awaitIdle()
Link copied to clipboard

Returns the recomposition count for the composable identified by tag. Refreshes the tag-to-function mapping before lookup.

Link copied to clipboard
Link copied to clipboard
open override fun onNode(matcher: SemanticsMatcher, useUnmergedTree: Boolean): SemanticsNodeInteraction
Link copied to clipboard
open override fun registerIdlingResource(idlingResource: IdlingResource)
Link copied to clipboard

Resets recomposition counts to zero while preserving composition history.

Link copied to clipboard
open override fun <T> runOnIdle(action: () -> T): T
Link copied to clipboard
open override fun <T> runOnUiThread(action: () -> T): T
Link copied to clipboard
open override fun setContent(composable: @Composable () -> Unit)
Link copied to clipboard
open override fun unregisterIdlingResource(idlingResource: IdlingResource)
Link copied to clipboard
open override fun waitForIdle()
Link copied to clipboard
open override fun waitUntil(timeoutMillis: Long, condition: () -> Boolean)
open override fun waitUntil(conditionDescription: String, timeoutMillis: Long, condition: () -> Boolean)
Link copied to clipboard
open override fun waitUntilAtLeastOneExists(matcher: SemanticsMatcher, timeoutMillis: Long)
Link copied to clipboard
open override fun waitUntilDoesNotExist(matcher: SemanticsMatcher, timeoutMillis: Long)
Link copied to clipboard
open override fun waitUntilExactlyOneExists(matcher: SemanticsMatcher, timeoutMillis: Long)
Link copied to clipboard
open override fun waitUntilNodeCount(matcher: SemanticsMatcher, count: Int, timeoutMillis: Long)