From 2c0bf2acdb8265c9c0724bde35f2c4a03dfe53f2 Mon Sep 17 00:00:00 2001 From: rahulsainani Date: Wed, 22 Nov 2023 11:45:59 +0100 Subject: [PATCH] Bug 1865318 - Fix review checker store tests --- .../shopping/store/ReviewQualityCheckStoreTest.kt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app/src/test/java/org/mozilla/fenix/shopping/store/ReviewQualityCheckStoreTest.kt b/app/src/test/java/org/mozilla/fenix/shopping/store/ReviewQualityCheckStoreTest.kt index 91acad8682..3137da3048 100644 --- a/app/src/test/java/org/mozilla/fenix/shopping/store/ReviewQualityCheckStoreTest.kt +++ b/app/src/test/java/org/mozilla/fenix/shopping/store/ReviewQualityCheckStoreTest.kt @@ -13,7 +13,6 @@ import mozilla.components.support.test.libstate.ext.waitUntilIdle import mozilla.components.support.test.middleware.CaptureActionsMiddleware import mozilla.components.support.test.rule.MainCoroutineRule import org.junit.Assert.assertFalse -import org.junit.Ignore import org.junit.Rule import org.junit.Test import org.mozilla.fenix.components.AppStore @@ -254,7 +253,6 @@ class ReviewQualityCheckStoreTest { assertEquals(expected, tested.state) } - @Ignore("Flaky: https://bugzilla.mozilla.org/show_bug.cgi?id=1865318") @Test fun `GIVEN the user has opted in the feature WHEN the user expands settings THEN state should reflect that`() = runTest { @@ -276,6 +274,7 @@ class ReviewQualityCheckStoreTest { tested.dispatch(ReviewQualityCheckAction.ExpandCollapseSettings).joinBlocking() tested.waitUntilIdle() dispatcher.scheduler.advanceUntilIdle() + appStore.waitUntilIdle() val expected = ReviewQualityCheckState.OptedIn( productRecommendationsPreference = false, @@ -288,7 +287,6 @@ class ReviewQualityCheckStoreTest { } } - @Ignore("Flaky: https://bugzilla.mozilla.org/show_bug.cgi?id=1865318") @Test fun `GIVEN the user has opted in the feature WHEN the user collapses settings THEN state should reflect that`() = runTest { @@ -319,6 +317,7 @@ class ReviewQualityCheckStoreTest { tested.dispatch(ReviewQualityCheckAction.ExpandCollapseSettings).joinBlocking() tested.waitUntilIdle() dispatcher.scheduler.advanceUntilIdle() + appStore.waitUntilIdle() val expected = ReviewQualityCheckState.OptedIn( productRecommendationsPreference = false, @@ -331,7 +330,6 @@ class ReviewQualityCheckStoreTest { } } - @Ignore("Flaky: https://bugzilla.mozilla.org/show_bug.cgi?id=1865318") @Test fun `GIVEN the user has opted in the feature WHEN the user expands info card THEN state should reflect that`() = runTest { @@ -353,6 +351,7 @@ class ReviewQualityCheckStoreTest { tested.dispatch(ReviewQualityCheckAction.ExpandCollapseInfo).joinBlocking() tested.waitUntilIdle() dispatcher.scheduler.advanceUntilIdle() + appStore.waitUntilIdle() val expected = ReviewQualityCheckState.OptedIn( productRecommendationsPreference = false, @@ -365,7 +364,6 @@ class ReviewQualityCheckStoreTest { } } - @Ignore("Flaky: https://bugzilla.mozilla.org/show_bug.cgi?id=1865318") @Test fun `GIVEN the user has opted in the feature WHEN the user collapses info card THEN state should reflect that`() = runTest { @@ -396,6 +394,7 @@ class ReviewQualityCheckStoreTest { tested.dispatch(ReviewQualityCheckAction.ExpandCollapseInfo).joinBlocking() tested.waitUntilIdle() dispatcher.scheduler.advanceUntilIdle() + appStore.waitUntilIdle() val expected = ReviewQualityCheckState.OptedIn( productRecommendationsPreference = false, @@ -408,7 +407,6 @@ class ReviewQualityCheckStoreTest { } } - @Ignore("Flaky: https://bugzilla.mozilla.org/show_bug.cgi?id=1865318") @Test fun `GIVEN the user has opted in the feature WHEN the user expands highlights card THEN state should reflect that`() = runTest { @@ -431,6 +429,7 @@ class ReviewQualityCheckStoreTest { tested.dispatch(ReviewQualityCheckAction.ExpandCollapseHighlights).joinBlocking() tested.waitUntilIdle() dispatcher.scheduler.advanceUntilIdle() + appStore.waitUntilIdle() val expected = ReviewQualityCheckState.OptedIn( productRecommendationsPreference = false, @@ -444,7 +443,6 @@ class ReviewQualityCheckStoreTest { } } - @Ignore("Flaky: https://bugzilla.mozilla.org/show_bug.cgi?id=1865318") @Test fun `GIVEN the user has opted in the feature WHEN the user collapses highlights card THEN state should reflect that`() = runTest { @@ -475,6 +473,7 @@ class ReviewQualityCheckStoreTest { tested.dispatch(ReviewQualityCheckAction.ExpandCollapseHighlights).joinBlocking() tested.waitUntilIdle() dispatcher.scheduler.advanceUntilIdle() + appStore.waitUntilIdle() val expected = ReviewQualityCheckState.OptedIn( productRecommendationsPreference = false,