I have the following in a UI test, but the test se...
# compose
t
I have the following in a UI test, but the test seems to hang..
Copy code
@Test
fun myTest() {

    composeTestRule.activity.runOnUiThread {
        val backPressedDispatcher = (composeTestRule.activity as OnBackPressedDispatcherOwner).onBackPressedDispatcher
        backPressedDispatcher.onBackPressed()
    }

    assertEquals(composeTestRule.activityRule.scenario.state,  Lifecycle.State.DESTROYED)
The test uses
ComposeTestRule
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