Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
sealed class TestSavedState

An opaque type representing the saved state of a test composition.

Link copied to clipboard
interface WidgetValue

A widget that's implemented as a value class, appropriate for use in tests.

Functions

Link copied to clipboard

Returns a sequence that does a depth-first preorder traversal of the entire widget tree whose roots are this list. This is the same order elements occur in code.

Link copied to clipboard
fun <W : Any, S> TestRedwoodComposition(scope: CoroutineScope, widgetSystem: WidgetSystem<W>, container: Widget.Children<W>, onBackPressedDispatcher: OnBackPressedDispatcher = NoOpOnBackPressedDispatcher, savedState: TestSavedState? = null, initialUiConfiguration: UiConfiguration = UiConfiguration(), createSnapshot: () -> S): TestRedwoodComposition<S>

Performs Redwood composition strictly for testing.

Link copied to clipboard

Encode this widget value snapshot into a list of changes which can be serialized and later applied to the UI to recreate the structure and state.

Encode this snapshot of widget values into a list of changes which can be serialized and later applied to the UI to recreate the structure and state.

Link copied to clipboard

Returns a formatted string of the widget tree whose roots are this list. For example: """ Column { Toolbar { Icon(...) Title(...) } } Row { Text(...) Button(...) } """