Skip to content

Commit a8156fa

Browse files
committed
fix focus trackers test
1 parent 6fc9801 commit a8156fa

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/src/test/java/com/duckduckgo/app/browser/omnibar/OmnibarLayoutViewModelTest.kt

+4-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class OmnibarLayoutViewModelTest {
6565
private val userBrowserProperties: UserBrowserProperties = mock()
6666

6767
private val mockVisualDesignExperimentDataStore: VisualDesignExperimentDataStore = mock()
68-
private val defaultVisualExperimentNavBarStateFlow = MutableStateFlow(FeatureState(isAvailable = true, isEnabled = false))
68+
private val defaultVisualExperimentNavBarStateFlow = MutableStateFlow(FeatureState(isAvailable = false, isEnabled = false))
6969

7070
private val defaultBrowserPromptsExperimentHighlightOverflowMenuFlow = MutableStateFlow(false)
7171
private val defaultBrowserPromptsExperiment: DefaultBrowserPromptsExperiment = mock()
@@ -86,7 +86,7 @@ class OmnibarLayoutViewModelTest {
8686
whenever(tabRepository.flowTabs).thenReturn(flowOf(emptyList()))
8787
whenever(voiceSearchAvailability.shouldShowVoiceSearch(any(), any(), any(), any())).thenReturn(true)
8888
whenever(duckPlayer.isDuckPlayerUri(DUCK_PLAYER_URL)).thenReturn(true)
89-
whenever(mockVisualDesignExperimentDataStore.navigationBarState).thenReturn(defaultVisualExperimentNavBarStateFlow)
89+
whenever(mockVisualDesignExperimentDataStore.experimentState).thenReturn(defaultVisualExperimentNavBarStateFlow)
9090

9191
initializeViewModel()
9292
}
@@ -865,11 +865,12 @@ class OmnibarLayoutViewModelTest {
865865
fun whenTrackersAnimationStartedAndOmnibarFocusedThenCommandAndViewStateCorrect() = runTest {
866866
testee.onOmnibarFocusChanged(true, SERP_URL)
867867
val trackers = givenSomeTrackers()
868+
868869
testee.onAnimationStarted(Decoration.LaunchTrackersAnimation(trackers))
869870

870871
testee.viewState.test {
871872
val viewState = awaitItem()
872-
assertTrue(viewState.leadingIconState == LeadingIconState.SEARCH)
873+
assertTrue(viewState.leadingIconState == LeadingIconState.PRIVACY_SHIELD)
873874
}
874875
}
875876

0 commit comments

Comments
 (0)