Marcin Wisniowski
11/06/2020, 10:51 PMspierce7
11/06/2020, 10:57 PMandroidx.ui:ui-test
exists for desktop.
i.e.
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()
}
}
Arkadii Ivanov
11/06/2020, 11:56 PMlist
module.spierce7
11/07/2020, 4:07 AMArkadii Ivanov
11/07/2020, 6:46 AMmain
moduleIgor Demin
11/07/2020, 10:37 AMor maybe it’s possible to use a subset of the android testing library to actually test compose desktopTry this: https://kotlinlang.slack.com/archives/C01D6HTPATV/p1604652533173500?thread_ts=1604618624.149600&cid=C01D6HTPATV