Skip to content

Commit

Permalink
Update whenComposableDestinationIsLaunchedWithContainerGroup_andSecon…
Browse files Browse the repository at this point in the history
…daryContainerSelected_andActivityIsRecreated_thenActiveContainerRemainsActive to attempt to deal with flakiness on API 27
  • Loading branch information
isaac-udy committed Jul 17, 2023
1 parent dcc5455 commit b3f5101
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,12 @@ class ComposableDestinationContainerGroups {
InstrumentationRegistry.getInstrumentation().runOnMainSync {
root.navigationContext.activity.recreate()
}
runBlocking { composeContentRule.awaitIdle() }
expectComposableContext<Destinations.SecondTab>()
runBlocking {
composeContentRule.waitUntil(timeoutMillis = 10_000) {
runCatching { expectComposableContext<Destinations.SecondTab>() }
.isSuccess
}
}
composeContentRule.onNodeWithText("First Tab Screen").assertDoesNotExist()
composeContentRule.onNodeWithText("Second Tab Screen").assertExists()
composeContentRule.onNodeWithText("Third Tab Screen").assertDoesNotExist()
Expand Down

0 comments on commit b3f5101

Please sign in to comment.