I just want to run the simple test
class Exa {
@get:Rule
val composeTestRule = createAndroidComposeRule<MainActivity>()
// createComposeRule() if you don't need access to the activityTestRule
@Test
fun MyTest() {
// Start the app
composeTestRule.setContent {
Greeting2("Nurs")
}
composeTestRule.onNodeWithText("Hello Nurs!").assertIsDisplayed()
}
}
@Composable
fun Greeting2(name: String) {
Text(text = "Hello $name!")
}
but it gives me the following error:
java.lang.IllegalStateException: pending composition has not been applied
the strange thing that if I run it in another project it works