Fix intermittent failures in Account Switcher tests (#539)

This commit is contained in:
Brian Yencho 2024-01-08 14:21:43 -06:00 committed by Álison Fernandes
parent 4bbda49d74
commit e318a316e7

View file

@ -25,6 +25,7 @@ fun ComposeContentTestRule.assertSwitcherIsDisplayed(
accountSummaries: List<AccountSummary>,
isAddAccountButtonVisible: Boolean = true,
) {
this.waitForIdle()
accountSummaries.forEach { accountSummary ->
this.onNodeWithText(accountSummary.email).assertIsDisplayed()
}
@ -43,6 +44,7 @@ fun ComposeContentTestRule.assertSwitcherIsDisplayed(
fun ComposeContentTestRule.assertSwitcherIsNotDisplayed(
accountSummaries: List<AccountSummary>,
) {
this.waitForIdle()
accountSummaries.forEach { accountSummary ->
this.onNodeWithText(accountSummary.email).assertDoesNotExist()
}