This was just released. You try it out and see how...
# compose-desktop
m
This was just released. You try it out and see how updating can look. You write the Compose testing blog post that will be referenced for years to come. It's experimental tech at this point, there are no established patterns, unless you establish them.
đź§µ 1
👆 4
s
Well there either is a way or their isn’t. My question is mostly wondering if something such as
Copy code
androidx.ui:ui-test
exists for desktop. i.e.
Copy code
class MyComposeTest {

    @get:Rule
    val composeTestRule = createAndroidComposeRule<MyActivity>()
    // createComposeRule() if you don't need access to the activityTestRule

    @Test
    fun MyTest() {
        // Start the app
        composeTestRule.setContent {
            MyAppTheme {
                MainScreen(uiState = exampleUiState, ...)
            }
        }

        onNodeWithText("Continue").performClick()

        onNodeWithText("Welcome").assertIsDisplayed()
    }
}
or maybe it’s possible to use a subset of the android testing library to actually test compose desktop
a
If you keep UI dumb and move all the logic out, you can test everything but UI with plain unit tests. The only thing left is to test the dumb UI, which is much less important in this case.
Checkout the Todo example. There are unit and integration tests in the
list
module.
s
@Arkadii Ivanov There is no list module in the todo example.
main has some tests though and I assume that’s what your talking about
a
Yeah, the
main
module
i
or maybe it’s possible to use a subset of the android testing library to actually test compose desktop
Try this: https://kotlinlang.slack.com/archives/C01D6HTPATV/p1604652533173500?thread_ts=1604618624.149600&amp;cid=C01D6HTPATV