From 4b3fb20ed225747aba1ffb93f768af61b73ede97 Mon Sep 17 00:00:00 2001 From: Ondrej Ruttkay <0nko@users.noreply.github.com> Date: Sat, 11 Jan 2025 13:04:00 +0100 Subject: [PATCH] Reduce the high-count buckets (#5457) Task/Issue URL: https://app.asana.com/0/1207418217763355/1208798050088814/f ### Description This PR removes the temporary high-count buckets from a tab-count pixel so that the highest one is 81+, as agreed in the privacy review. --- .../duckduckgo/app/tabs/store/TabStatsBucketing.kt | 7 +------ .../app/tabs/store/TabStatsBucketingTest.kt | 12 ++++++------ 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/app/src/main/java/com/duckduckgo/app/tabs/store/TabStatsBucketing.kt b/app/src/main/java/com/duckduckgo/app/tabs/store/TabStatsBucketing.kt index d31686965504..447448941e86 100644 --- a/app/src/main/java/com/duckduckgo/app/tabs/store/TabStatsBucketing.kt +++ b/app/src/main/java/com/duckduckgo/app/tabs/store/TabStatsBucketing.kt @@ -46,12 +46,7 @@ interface TabStatsBucketing { 21..40, 41..60, 61..80, - 81..100, - 101..125, - 126..150, - 151..250, - 251..500, - 501..Int.MAX_VALUE, + 81..Int.MAX_VALUE, ) val ACTIVITY_BUCKETS = listOf( diff --git a/app/src/test/java/com/duckduckgo/app/tabs/store/TabStatsBucketingTest.kt b/app/src/test/java/com/duckduckgo/app/tabs/store/TabStatsBucketingTest.kt index 511ee02756d8..6fc9fe872820 100644 --- a/app/src/test/java/com/duckduckgo/app/tabs/store/TabStatsBucketingTest.kt +++ b/app/src/test/java/com/duckduckgo/app/tabs/store/TabStatsBucketingTest.kt @@ -94,42 +94,42 @@ class DefaultTabStatsBucketingTest { fun testGetNumberOfOpenTabs81To100() = runTest { whenever(tabRepository.getOpenTabCount()).thenReturn(90) val result = defaultTabStatsBucketing.getNumberOfOpenTabs() - assertEquals("81-100", result) + assertEquals("81+", result) } @Test fun testGetNumberOfOpenTabs101To125() = runTest { whenever(tabRepository.getOpenTabCount()).thenReturn(110) val result = defaultTabStatsBucketing.getNumberOfOpenTabs() - assertEquals("101-125", result) + assertEquals("81+", result) } @Test fun testGetNumberOfOpenTabs126To150() = runTest { whenever(tabRepository.getOpenTabCount()).thenReturn(130) val result = defaultTabStatsBucketing.getNumberOfOpenTabs() - assertEquals("126-150", result) + assertEquals("81+", result) } @Test fun testGetNumberOfOpenTabs151To250() = runTest { whenever(tabRepository.getOpenTabCount()).thenReturn(200) val result = defaultTabStatsBucketing.getNumberOfOpenTabs() - assertEquals("151-250", result) + assertEquals("81+", result) } @Test fun testGetNumberOfOpenTabs251To500() = runTest { whenever(tabRepository.getOpenTabCount()).thenReturn(300) val result = defaultTabStatsBucketing.getNumberOfOpenTabs() - assertEquals("251-500", result) + assertEquals("81+", result) } @Test fun testGetNumberOfOpenTabsMaxValue() = runTest { whenever(tabRepository.getOpenTabCount()).thenReturn(600) val result = defaultTabStatsBucketing.getNumberOfOpenTabs() - assertEquals("501+", result) + assertEquals("81+", result) } @Test