From d7c1238dac44c6e9ce80de455f8137e8409bd829 Mon Sep 17 00:00:00 2001 From: Jonathan Almeida Date: Wed, 22 Sep 2021 20:34:28 -0400 Subject: [PATCH] [fenix] Issue https://github.com/mozilla-mobile/fenix/issues/21366: Speculative fix for failing test in TitleHeaderBindingTest --- .../fenix/tabstray/browser/TitleHeaderBindingTest.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/test/java/org/mozilla/fenix/tabstray/browser/TitleHeaderBindingTest.kt b/app/src/test/java/org/mozilla/fenix/tabstray/browser/TitleHeaderBindingTest.kt index ac45bb6628..e81b657d7f 100644 --- a/app/src/test/java/org/mozilla/fenix/tabstray/browser/TitleHeaderBindingTest.kt +++ b/app/src/test/java/org/mozilla/fenix/tabstray/browser/TitleHeaderBindingTest.kt @@ -31,10 +31,10 @@ class TitleHeaderBindingTest { val store = BrowserStore() val binding = TitleHeaderBinding(store) { result = it } - store.dispatch(TabListAction.AddTabAction(createTab("https://mozilla.org"))).joinBlocking() - binding.start() + store.dispatch(TabListAction.AddTabAction(createTab("https://mozilla.org"))).joinBlocking() + store.waitUntilIdle() assertTrue(result) @@ -46,6 +46,8 @@ class TitleHeaderBindingTest { val store = BrowserStore() val binding = TitleHeaderBinding(store) { result = it } + binding.start() + store.dispatch( TabListAction.AddTabAction( createTab( @@ -58,8 +60,6 @@ class TitleHeaderBindingTest { ) ).joinBlocking() - binding.start() - store.waitUntilIdle() assertFalse(result) @@ -75,10 +75,10 @@ class TitleHeaderBindingTest { ) val binding = TitleHeaderBinding(store) { result = it } - store.dispatch(TabListAction.RemoveTabAction("123")).joinBlocking() - binding.start() + store.dispatch(TabListAction.RemoveTabAction("123")).joinBlocking() + store.waitUntilIdle() assertFalse(result)