Remove waitForIdle calls from account switcher tests (#598)

This commit is contained in:
Brian Yencho 2024-01-13 10:19:12 -06:00 committed by Álison Fernandes
parent 96a9a41836
commit 70308c84be

View file

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