@@ -585,6 +585,39 @@ class TabSwitcherViewModelTest {
585
585
assertFalse(items.first() is TabSwitcherItem .TrackerAnimationInfoPanel )
586
586
}
587
587
588
+ @Test
589
+ fun `when Animation Tile visible then impressions pixel fired` () = runTest {
590
+ initializeViewModel(FakeTabSwitcherDataStore ())
591
+ tabSwitcherAnimationFeature.self().setRawStoredState(State (enable = true ))
592
+ whenever(mockWebTrackersBlockedAppRepository.getTrackerCountForLast7Days()).thenReturn(15 )
593
+
594
+ testee.onTrackerAnimationInfoPanelVisible()
595
+
596
+ verify(mockPixel).fire(AppPixelName .TAB_MANAGER_INFO_PANEL_IMPRESSIONS )
597
+ }
598
+
599
+ @Test
600
+ fun `when Animation Tile clicked then tapped pixel fired` () = runTest {
601
+ initializeViewModel(FakeTabSwitcherDataStore ())
602
+ tabSwitcherAnimationFeature.self().setRawStoredState(State (enable = true ))
603
+ whenever(mockWebTrackersBlockedAppRepository.getTrackerCountForLast7Days()).thenReturn(15 )
604
+
605
+ testee.onTrackerAnimationInfoPanelClicked()
606
+
607
+ verify(mockPixel).fire(AppPixelName .TAB_MANAGER_INFO_PANEL_TAPPED )
608
+ }
609
+
610
+ @Test
611
+ fun `when Animation Tile negative button clicked then dismiss pixel fired` () = runTest {
612
+ initializeViewModel(FakeTabSwitcherDataStore ())
613
+ tabSwitcherAnimationFeature.self().setRawStoredState(State (enable = true ))
614
+ whenever(mockWebTrackersBlockedAppRepository.getTrackerCountForLast7Days()).thenReturn(15 )
615
+
616
+ testee.onTrackerAnimationTileNegativeButtonClicked()
617
+
618
+ verify(mockPixel).fire(pixel = AppPixelName .TAB_MANAGER_INFO_PANEL_DISMISSED , parameters = mapOf (" trackerCount" to " 15" ))
619
+ }
620
+
588
621
private class FakeTabSwitcherDataStore : TabSwitcherDataStore {
589
622
590
623
private val animationTileDismissedFlow = MutableStateFlow (false )
0 commit comments