Odin
07/29/2021, 2:14 PMjava.lang.AssertionError: Activity never becomes requested state "[RESUMED, CREATED, STARTED, DESTROYED]" (last lifecycle transition = "PRE_ON_CREATE")
I saw that someone here had this problem before and solved it by adding a ComponentActivity in their manifest, but I just get the same result. Has anyone here had the same experience? 😄 🤔@LargeTest
@HiltAndroidTest
class TriviaMenuUiTest {
@get:Rule(order = 0)
val hiltAndroidRule = HiltAndroidRule(this)
@get:Rule(order = 1)
val composeTestRule = createComposeRule()
@Test
fun testQuickPlayButtonIsPresent() {
composeTestRule.setContent {
KiwiTheme {
TriviaMenu(
onQuickStart = { /*TODO*/ },
onBrowseCategories = { /*TODO*/ },
onBrowsePreviousResults = { /*TODO*/ },
signOut = { }
)
}
}
composeTestRule.apply {
onNodeWithTag("quick-play")
.assertExists("Quick play button does not exist")
onNodeWithTag("quick-play")
.assertIsDisplayed()
}
}
}
theapache64
03/08/2022, 4:58 PM7.2.0-beta01
. Were you able to fix it?Odin
03/09/2022, 7:40 AMtheapache64
03/13/2022, 9:13 AM