Tim Malseed
12/22/2021, 6:48 AM@Test
fun myTest() {
composeTestRule.activity.runOnUiThread {
val backPressedDispatcher = (composeTestRule.activity as OnBackPressedDispatcherOwner).onBackPressedDispatcher
backPressedDispatcher.onBackPressed()
}
assertEquals(composeTestRule.activityRule.scenario.state, Lifecycle.State.DESTROYED)
Tim Malseed
12/22/2021, 6:49 AMComposeTestRule
and composeTestRule.setContent()
. I’m wondering if there’s an issue because the current Activity under test has been (or is in the process of being) destroyed