You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1208671518894266/task/1211257482984660?focus=true
### Description
Adds `text_length_bucket` pixel param to search queries or AI prompts
submitted on the Input Screen.
Text Length Buckets: short (1-15), medium (16-40), long (41-100),
very_long (100+).
### Steps to test this PR
- [x] Enable Input Screen.
- [x] Submit a search query, verify
`m_aichat_experimental_omnibar_query_submitted_count` pixel is sent with
`text_length_bucket` param.
- [x] Submit n AI prompt, verify
`m_aichat_experimental_omnibar_prompt_submitted_count` pixel is sent
with `text_length_bucket` param.
- [x] Try different text lengths according to the buckets in code and
verify the parameter matches.
Copy file name to clipboardExpand all lines: duckchat/duckchat-impl/src/main/java/com/duckduckgo/duckchat/impl/inputscreen/ui/viewmodel/InputScreenViewModel.kt
+15-2Lines changed: 15 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -363,7 +363,10 @@ class InputScreenViewModel @AssistedInject constructor(
363
363
funonSearchSubmitted(query:String) {
364
364
val sanitizedQuery = query.replace(oldValue ="\n", newValue ="")
Copy file name to clipboardExpand all lines: duckchat/duckchat-impl/src/test/kotlin/com/duckduckgo/duckchat/impl/ui/inputscreen/InputScreenViewModelTest.kt
+102-3Lines changed: 102 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,7 @@ import org.junit.Rule
44
44
importorg.junit.Test
45
45
importorg.junit.runner.RunWith
46
46
importorg.mockito.kotlin.any
47
+
importorg.mockito.kotlin.clearInvocations
47
48
importorg.mockito.kotlin.mock
48
49
importorg.mockito.kotlin.never
49
50
importorg.mockito.kotlin.times
@@ -835,7 +836,8 @@ class InputScreenViewModelTest {
0 commit comments