From 6b5ce4d387b77b2b65d6325458821964fd7fa856 Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Wed, 24 Nov 2021 13:38:40 -0500 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/22488 - Fix intermittent test failure with InactiveTabsControllerTest --- .../fenix/tabstray/browser/InactiveTabsControllerTest.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/test/java/org/mozilla/fenix/tabstray/browser/InactiveTabsControllerTest.kt b/app/src/test/java/org/mozilla/fenix/tabstray/browser/InactiveTabsControllerTest.kt index 7f5e043762..f09ecb77e3 100644 --- a/app/src/test/java/org/mozilla/fenix/tabstray/browser/InactiveTabsControllerTest.kt +++ b/app/src/test/java/org/mozilla/fenix/tabstray/browser/InactiveTabsControllerTest.kt @@ -14,6 +14,7 @@ import io.mockk.verify import mozilla.components.browser.state.state.TabSessionState import mozilla.components.browser.state.store.BrowserStore import mozilla.components.browser.tabstray.TabsTray +import mozilla.components.support.test.libstate.ext.waitUntilIdle import org.junit.Assert.assertEquals import mozilla.components.browser.state.state.createTab as createTabState import org.junit.Test @@ -47,6 +48,8 @@ class InactiveTabsControllerTest { controller.updateCardExpansion(true) + appStore.waitUntilIdle() + verify { tray.updateTabs(capture(tabsSlot), any()) } assertEquals(2, tabsSlot.captured.size)