Vince Rickey
05/12/2021, 5:57 PMVince Rickey
05/12/2021, 5:59 PM@SmallTest
class ComposeTextTest {
@get:Rule
val composeTestRule = createComposeRule()
// createComposeRule() if you don't need access to the activityTestRule
val content = "Hello World!"
@Test
fun MyTest() {
// Start the app
composeTestRule.setContent {
MaterialTheme {
Text(text = content)
}
}
composeTestRule.onNodeWithText(content).assertIsDisplayed()
}
}
Bryan L
05/12/2021, 7:48 PMtestInstrumentationRunner
and confirm that you have the correct path. This fixed my issue anyways