@@ -86,6 +86,7 @@ import com.duckduckgo.app.notification.model.UseOurAppNotification
8686import com.duckduckgo.app.onboarding.store.AppStage
8787import com.duckduckgo.app.onboarding.store.OnboardingStore
8888import com.duckduckgo.app.onboarding.store.UserStageStore
89+ import com.duckduckgo.app.pixels.AppPixelName
8990import com.duckduckgo.app.privacy.db.NetworkLeaderboardDao
9091import com.duckduckgo.app.privacy.db.UserWhitelistDao
9192import com.duckduckgo.app.privacy.model.PrivacyGrade
@@ -1095,15 +1096,15 @@ class BrowserTabViewModelTest {
10951096 loadUrl(" http://example.com" )
10961097 testee.onDesktopSiteModeToggled(true )
10971098 verify(mockCommandObserver, atLeastOnce()).onChanged(commandCaptor.capture())
1098- verify(mockPixel).fire(Pixel . PixelName .MENU_ACTION_DESKTOP_SITE_ENABLE_PRESSED )
1099+ verify(mockPixel).fire(AppPixelName .MENU_ACTION_DESKTOP_SITE_ENABLE_PRESSED )
10991100 assertTrue(browserViewState().isDesktopBrowsingMode)
11001101 }
11011102
11021103 @Test
11031104 fun whenUserSelectsMobileSiteThenMobileModeStateUpdated () {
11041105 loadUrl(" http://example.com" )
11051106 testee.onDesktopSiteModeToggled(false )
1106- verify(mockPixel).fire(Pixel . PixelName .MENU_ACTION_DESKTOP_SITE_DISABLE_PRESSED )
1107+ verify(mockPixel).fire(AppPixelName .MENU_ACTION_DESKTOP_SITE_DISABLE_PRESSED )
11071108 assertFalse(browserViewState().isDesktopBrowsingMode)
11081109 }
11091110
@@ -1385,7 +1386,7 @@ class BrowserTabViewModelTest {
13851386 loadUrl(" http://www.example.com/home.html" )
13861387 testee.onWhitelistSelected()
13871388 verify(mockUserWhitelistDao).insert(UserWhitelistedDomain (" www.example.com" ))
1388- verify(mockPixel).fire(Pixel . PixelName .BROWSER_MENU_WHITELIST_ADD )
1389+ verify(mockPixel).fire(AppPixelName .BROWSER_MENU_WHITELIST_ADD )
13891390 verify(mockCommandObserver).onChanged(Command .Refresh )
13901391 }
13911392
@@ -1395,7 +1396,7 @@ class BrowserTabViewModelTest {
13951396 loadUrl(" http://www.example.com/home.html" )
13961397 testee.onWhitelistSelected()
13971398 verify(mockUserWhitelistDao).delete(UserWhitelistedDomain (" www.example.com" ))
1398- verify(mockPixel).fire(Pixel . PixelName .BROWSER_MENU_WHITELIST_REMOVE )
1399+ verify(mockPixel).fire(AppPixelName .BROWSER_MENU_WHITELIST_REMOVE )
13991400 verify(mockCommandObserver).onChanged(Command .Refresh )
14001401 }
14011402
@@ -1635,7 +1636,7 @@ class BrowserTabViewModelTest {
16351636 val suggestion = AutoCompleteBookmarkSuggestion (" example" , " Example" , " https://example.com" )
16361637 testee.autoCompleteViewState.value = autoCompleteViewState().copy(searchResults = AutoCompleteResult (" " , listOf (suggestion)))
16371638 testee.fireAutocompletePixel(suggestion)
1638- verify(mockPixel).fire(Pixel . PixelName .AUTOCOMPLETE_BOOKMARK_SELECTION , pixelParams(showedBookmarks = true , bookmarkCapable = true ))
1639+ verify(mockPixel).fire(AppPixelName .AUTOCOMPLETE_BOOKMARK_SELECTION , pixelParams(showedBookmarks = true , bookmarkCapable = true ))
16391640 }
16401641
16411642 @Test
@@ -1645,7 +1646,7 @@ class BrowserTabViewModelTest {
16451646 testee.autoCompleteViewState.value = autoCompleteViewState().copy(searchResults = AutoCompleteResult (" " , suggestions))
16461647 testee.fireAutocompletePixel(AutoCompleteSearchSuggestion (" example" , false ))
16471648
1648- verify(mockPixel).fire(Pixel . PixelName .AUTOCOMPLETE_SEARCH_SELECTION , pixelParams(showedBookmarks = true , bookmarkCapable = true ))
1649+ verify(mockPixel).fire(AppPixelName .AUTOCOMPLETE_SEARCH_SELECTION , pixelParams(showedBookmarks = true , bookmarkCapable = true ))
16491650 }
16501651
16511652 @Test
@@ -1654,7 +1655,7 @@ class BrowserTabViewModelTest {
16541655 testee.autoCompleteViewState.value = autoCompleteViewState().copy(searchResults = AutoCompleteResult (" " , emptyList()))
16551656 testee.fireAutocompletePixel(AutoCompleteSearchSuggestion (" example" , false ))
16561657
1657- verify(mockPixel).fire(Pixel . PixelName .AUTOCOMPLETE_SEARCH_SELECTION , pixelParams(showedBookmarks = false , bookmarkCapable = false ))
1658+ verify(mockPixel).fire(AppPixelName .AUTOCOMPLETE_SEARCH_SELECTION , pixelParams(showedBookmarks = false , bookmarkCapable = false ))
16581659 }
16591660
16601661 @Test
@@ -2061,7 +2062,7 @@ class BrowserTabViewModelTest {
20612062 fun whenFireproofWebsiteAddedThenPixelSent () {
20622063 loadUrl(" http://example.com/" , isBrowserShowing = true )
20632064 testee.onFireproofWebsiteMenuClicked()
2064- verify(mockPixel).fire(Pixel . PixelName .FIREPROOF_WEBSITE_ADDED )
2065+ verify(mockPixel).fire(AppPixelName .FIREPROOF_WEBSITE_ADDED )
20652066 }
20662067
20672068 @Test
@@ -2077,7 +2078,7 @@ class BrowserTabViewModelTest {
20772078 givenFireproofWebsiteDomain(" mobile.example.com" )
20782079 loadUrl(" http://mobile.example.com/" , isBrowserShowing = true )
20792080 testee.onFireproofWebsiteMenuClicked()
2080- verify(mockPixel).fire(Pixel . PixelName .FIREPROOF_WEBSITE_REMOVE )
2081+ verify(mockPixel).fire(AppPixelName .FIREPROOF_WEBSITE_REMOVE )
20812082 }
20822083
20832084 @Test
@@ -2098,7 +2099,7 @@ class BrowserTabViewModelTest {
20982099 assertCommandIssued<Command .ShowFireproofWebSiteConfirmation > {
20992100 testee.onFireproofWebsiteSnackbarUndoClicked(this .fireproofWebsiteEntity)
21002101 }
2101- verify(mockPixel).fire(Pixel . PixelName .FIREPROOF_WEBSITE_UNDO )
2102+ verify(mockPixel).fire(AppPixelName .FIREPROOF_WEBSITE_UNDO )
21022103 }
21032104
21042105 @Test
@@ -2313,7 +2314,7 @@ class BrowserTabViewModelTest {
23132314
23142315 testee.onViewReady()
23152316
2316- verify(mockPixel).fire(Pixel . PixelName .UOA_VISITED_AFTER_NOTIFICATION )
2317+ verify(mockPixel).fire(AppPixelName .UOA_VISITED_AFTER_NOTIFICATION )
23172318 }
23182319
23192320 @Test
@@ -2323,7 +2324,7 @@ class BrowserTabViewModelTest {
23232324
23242325 testee.onViewReady()
23252326
2326- verify(mockPixel).fire(Pixel . PixelName .UOA_VISITED_AFTER_SHORTCUT )
2327+ verify(mockPixel).fire(AppPixelName .UOA_VISITED_AFTER_SHORTCUT )
23272328 }
23282329
23292330 @Test
@@ -2333,7 +2334,7 @@ class BrowserTabViewModelTest {
23332334
23342335 testee.onViewReady()
23352336
2336- verify(mockPixel).fire(Pixel . PixelName .UOA_VISITED_AFTER_DELETE_CTA )
2337+ verify(mockPixel).fire(AppPixelName .UOA_VISITED_AFTER_DELETE_CTA )
23372338 }
23382339
23392340 @Test
@@ -2342,7 +2343,7 @@ class BrowserTabViewModelTest {
23422343
23432344 testee.onViewReady()
23442345
2345- verify(mockPixel).fire(Pixel . PixelName .UOA_VISITED )
2346+ verify(mockPixel).fire(AppPixelName .UOA_VISITED )
23462347 }
23472348
23482349 @Test
@@ -2352,7 +2353,7 @@ class BrowserTabViewModelTest {
23522353
23532354 testee.onViewReady()
23542355
2355- verify(mockPixel, never()).fire(Pixel . PixelName .UOA_VISITED_AFTER_NOTIFICATION )
2356+ verify(mockPixel, never()).fire(AppPixelName .UOA_VISITED_AFTER_NOTIFICATION )
23562357 }
23572358
23582359 @Test
@@ -2362,7 +2363,7 @@ class BrowserTabViewModelTest {
23622363
23632364 testee.onViewReady()
23642365
2365- verify(mockPixel, never()).fire(Pixel . PixelName .UOA_VISITED_AFTER_SHORTCUT )
2366+ verify(mockPixel, never()).fire(AppPixelName .UOA_VISITED_AFTER_SHORTCUT )
23662367 }
23672368
23682369 @Test
@@ -2372,7 +2373,7 @@ class BrowserTabViewModelTest {
23722373
23732374 testee.onViewReady()
23742375
2375- verify(mockPixel, never()).fire(Pixel . PixelName .UOA_VISITED_AFTER_DELETE_CTA )
2376+ verify(mockPixel, never()).fire(AppPixelName .UOA_VISITED_AFTER_DELETE_CTA )
23762377 }
23772378
23782379 @Test
@@ -2381,7 +2382,7 @@ class BrowserTabViewModelTest {
23812382
23822383 testee.onViewReady()
23832384
2384- verify(mockPixel, never()).fire(Pixel . PixelName .UOA_VISITED )
2385+ verify(mockPixel, never()).fire(AppPixelName .UOA_VISITED )
23852386 }
23862387
23872388 @Test
@@ -2391,7 +2392,7 @@ class BrowserTabViewModelTest {
23912392
23922393 loadUrl(USE_OUR_APP_DOMAIN , isBrowserShowing = true )
23932394
2394- verify(mockPixel).fire(Pixel . PixelName .UOA_VISITED_AFTER_NOTIFICATION )
2395+ verify(mockPixel).fire(AppPixelName .UOA_VISITED_AFTER_NOTIFICATION )
23952396 }
23962397
23972398 @Test
@@ -2401,7 +2402,7 @@ class BrowserTabViewModelTest {
24012402
24022403 loadUrl(USE_OUR_APP_DOMAIN , isBrowserShowing = true )
24032404
2404- verify(mockPixel).fire(Pixel . PixelName .UOA_VISITED_AFTER_SHORTCUT )
2405+ verify(mockPixel).fire(AppPixelName .UOA_VISITED_AFTER_SHORTCUT )
24052406 }
24062407
24072408 @Test
@@ -2411,7 +2412,7 @@ class BrowserTabViewModelTest {
24112412
24122413 loadUrl(USE_OUR_APP_DOMAIN , isBrowserShowing = true )
24132414
2414- verify(mockPixel).fire(Pixel . PixelName .UOA_VISITED_AFTER_DELETE_CTA )
2415+ verify(mockPixel).fire(AppPixelName .UOA_VISITED_AFTER_DELETE_CTA )
24152416 }
24162417
24172418 @Test
@@ -2420,7 +2421,7 @@ class BrowserTabViewModelTest {
24202421
24212422 loadUrl(USE_OUR_APP_DOMAIN , isBrowserShowing = true )
24222423
2423- verify(mockPixel).fire(Pixel . PixelName .UOA_VISITED )
2424+ verify(mockPixel).fire(AppPixelName .UOA_VISITED )
24242425 }
24252426
24262427 @Test
@@ -2430,7 +2431,7 @@ class BrowserTabViewModelTest {
24302431
24312432 loadUrl(USE_OUR_APP_DOMAIN , isBrowserShowing = true )
24322433
2433- verify(mockPixel, never()).fire(Pixel . PixelName .UOA_VISITED_AFTER_NOTIFICATION )
2434+ verify(mockPixel, never()).fire(AppPixelName .UOA_VISITED_AFTER_NOTIFICATION )
24342435 }
24352436
24362437 @Test
@@ -2441,7 +2442,7 @@ class BrowserTabViewModelTest {
24412442
24422443 loadUrl(USE_OUR_APP_DOMAIN , isBrowserShowing = true )
24432444
2444- verify(mockPixel, never()).fire(Pixel . PixelName .UOA_VISITED_AFTER_SHORTCUT )
2445+ verify(mockPixel, never()).fire(AppPixelName .UOA_VISITED_AFTER_SHORTCUT )
24452446 }
24462447
24472448 @Test
@@ -2451,7 +2452,7 @@ class BrowserTabViewModelTest {
24512452
24522453 loadUrl(USE_OUR_APP_DOMAIN , isBrowserShowing = true )
24532454
2454- verify(mockPixel, never()).fire(Pixel . PixelName .UOA_VISITED_AFTER_DELETE_CTA )
2455+ verify(mockPixel, never()).fire(AppPixelName .UOA_VISITED_AFTER_DELETE_CTA )
24552456 }
24562457
24572458 @Test
@@ -2460,7 +2461,7 @@ class BrowserTabViewModelTest {
24602461
24612462 loadUrl(USE_OUR_APP_DOMAIN , isBrowserShowing = true )
24622463
2463- verify(mockPixel, never()).fire(Pixel . PixelName .UOA_VISITED )
2464+ verify(mockPixel, never()).fire(AppPixelName .UOA_VISITED )
24642465 }
24652466
24662467 @Test
@@ -2565,7 +2566,7 @@ class BrowserTabViewModelTest {
25652566
25662567 testee.onSystemLocationPermissionDeniedOneTime()
25672568
2568- verify(mockPixel).fire(Pixel . PixelName .PRECISE_LOCATION_SETTINGS_LOCATION_PERMISSION_DISABLE )
2569+ verify(mockPixel).fire(AppPixelName .PRECISE_LOCATION_SETTINGS_LOCATION_PERMISSION_DISABLE )
25692570 verify(geoLocationPermissions).clear(domain)
25702571 }
25712572
@@ -2592,7 +2593,7 @@ class BrowserTabViewModelTest {
25922593
25932594 testee.onSystemLocationPermissionGranted()
25942595
2595- verify(mockPixel).fire(Pixel . PixelName .PRECISE_LOCATION_SETTINGS_LOCATION_PERMISSION_ENABLE )
2596+ verify(mockPixel).fire(AppPixelName .PRECISE_LOCATION_SETTINGS_LOCATION_PERMISSION_ENABLE )
25962597 }
25972598
25982599 @Test
@@ -2674,7 +2675,7 @@ class BrowserTabViewModelTest {
26742675
26752676 testee.onSystemLocationPermissionNotAllowed()
26762677
2677- verify(mockPixel).fire(Pixel . PixelName .PRECISE_LOCATION_SYSTEM_DIALOG_LATER )
2678+ verify(mockPixel).fire(AppPixelName .PRECISE_LOCATION_SYSTEM_DIALOG_LATER )
26782679 verify(geoLocationPermissions).clear(domain)
26792680 }
26802681
@@ -2688,7 +2689,7 @@ class BrowserTabViewModelTest {
26882689
26892690 testee.onSystemLocationPermissionNeverAllowed()
26902691
2691- verify(mockPixel).fire(Pixel . PixelName .PRECISE_LOCATION_SYSTEM_DIALOG_NEVER )
2692+ verify(mockPixel).fire(AppPixelName .PRECISE_LOCATION_SYSTEM_DIALOG_NEVER )
26922693 verify(geoLocationPermissions).clear(domain)
26932694 assertEquals(locationPermissionsDao.getPermission(domain)!! .permission, LocationPermissionType .DENY_ALWAYS )
26942695 }
0 commit comments