Skip to content

Commit 32f51da

Browse files
Add new SERP variants and enable them (#1353)
1 parent 7719506 commit 32f51da

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

app/src/androidTest/java/com/duckduckgo/app/statistics/VariantManagerTest.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,20 @@ class VariantManagerTest {
4242
assertEquals(0, variant.features.size)
4343
}
4444

45+
@Test
46+
fun serpGxControlVariantHasExpectedWeightAndNoFeatures() {
47+
val variant = variants.first { it.key == "gx" }
48+
assertEqualsDouble(0.1, variant.weight)
49+
assertEquals(0, variant.features.size)
50+
}
51+
52+
@Test
53+
fun serpGyExperimentalVariantHasExpectedWeightAndNoFeatures() {
54+
val variant = variants.first { it.key == "gy" }
55+
assertEqualsDouble(0.1, variant.weight)
56+
assertEquals(0, variant.features.size)
57+
}
58+
4559
@Test
4660
fun verifyNoDuplicateVariantNames() {
4761
val existingNames = mutableSetOf<String>()

statistics/src/main/java/com/duckduckgo/app/statistics/VariantManager.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ interface VariantManager {
4141
// the future if we can filter by app version
4242
Variant(key = "sc", weight = 0.0, features = emptyList(), filterBy = { isSerpRegionToggleCountry() }),
4343
Variant(key = "se", weight = 0.0, features = emptyList(), filterBy = { isSerpRegionToggleCountry() }),
44+
Variant(key = "gx", weight = 0.1, features = emptyList(), filterBy = { noFilter() }),
45+
Variant(key = "gy", weight = 0.1, features = emptyList(), filterBy = { noFilter() }),
4446
)
4547

4648
val REFERRER_VARIANTS = listOf(

0 commit comments

Comments
 (0)