DesktopComposeUiTest



Summary

Public constructors

android

Public functions

open suspend Unit
android
open SemanticsNodeInteractionCollection
onAllNodes(matcher: SemanticsMatcher, useUnmergedTree: Boolean)
android
open SemanticsNodeInteraction
onNode(matcher: SemanticsMatcher, useUnmergedTree: Boolean)
android
open Unit
android
open T
<T : Any?> runOnIdle(action: () -> T)
android
open T
<T : Any?> runOnUiThread(action: () -> T)
android
R
<R : Any?> runTest(block: ComposeUiTest.() -> R)
android
open Unit
setContent(composable: @Composable () -> Unit)
android
open Unit
android
open Unit
android
open Unit
waitUntil(
    conditionDescription: String?,
    timeoutMillis: Long,
    condition: () -> Boolean
)
android

Public properties

open Density
android
open MainTestClock
android
lateinit ComposeScene
android

Public constructors

DesktopComposeUiTest

DesktopComposeUiTest(
    effectContext: CoroutineContext = EmptyCoroutineContext
)
Parameters
effectContext: CoroutineContext = EmptyCoroutineContext

The CoroutineContext used to run the composition. The context for LaunchedEffects and rememberCoroutineScope will be derived from this context.

Public functions

awaitIdle

open suspend fun awaitIdle(): Unit

onAllNodes

open fun onAllNodes(matcher: SemanticsMatcher, useUnmergedTree: Boolean): SemanticsNodeInteractionCollection
Parameters
matcher: SemanticsMatcher
useUnmergedTree: Boolean

onNode

open fun onNode(matcher: SemanticsMatcher, useUnmergedTree: Boolean): SemanticsNodeInteraction
Parameters
matcher: SemanticsMatcher
useUnmergedTree: Boolean

registerIdlingResource

open fun registerIdlingResource(idlingResource: IdlingResource): Unit

runOnIdle

open fun <T : Any?> runOnIdle(action: () -> T): T

runOnUiThread

open fun <T : Any?> runOnUiThread(action: () -> T): T

runTest

fun <R : Any?> runTest(block: ComposeUiTest.() -> R): R

setContent

open fun setContent(composable: @Composable () -> Unit): Unit

unregisterIdlingResource

open fun unregisterIdlingResource(idlingResource: IdlingResource): Unit

waitForIdle

open fun waitForIdle(): Unit

waitUntil

open fun waitUntil(
    conditionDescription: String?,
    timeoutMillis: Long,
    condition: () -> Boolean
): Unit

Public properties

density

open val densityDensity

mainClock

open val mainClockMainTestClock

scene

lateinit var sceneComposeScene