TestRedwoodComposition

Properties

Link copied to clipboard
abstract val uiConfigurations: MutableStateFlow<UiConfiguration>

The mutable UiConfiguration instance bound to UiConfiguration.current inside the composition.

Functions

Link copied to clipboard
abstract suspend fun awaitSnapshot(timeout: Duration = 1.seconds): S

Returns a snapshot, waiting if necessary for changes to occur since the previous snapshot. Each call to this function is guaranteed to send at least once frame to the composition.

Link copied to clipboard
abstract fun cancel()
Link copied to clipboard
abstract fun saveState(): TestSavedState
Link copied to clipboard
abstract fun setContent(content: () -> Unit)
Link copied to clipboard
abstract fun setContentAndSnapshot(content: @Composable () -> Unit): S

A fused call which does both setContent and awaitSnapshot, but without sending a frame to the composition. The snapshot returned will always be the result of the synchronous recomposition of content.