@@ -32,6 +32,7 @@ import com.duckduckgo.app.browser.SpecialUrlDetectorImpl.Companion.SMS_MAX_LENGT
3232import com.duckduckgo.app.browser.applinks.ExternalAppIntentFlagsFeature
3333import com.duckduckgo.app.browser.duckchat.AIChatQueryDetectionFeature
3434import com.duckduckgo.app.pixels.remoteconfig.AndroidBrowserConfigFeature
35+ import com.duckduckgo.duckchat.api.DuckAiFeatureState
3536import com.duckduckgo.duckchat.api.DuckChat
3637import com.duckduckgo.duckplayer.api.DuckPlayer
3738import com.duckduckgo.feature.toggles.api.FakeFeatureToggleFactory
@@ -43,6 +44,7 @@ import com.duckduckgo.privacy.config.api.TrackingParameters
4344import com.duckduckgo.subscriptions.api.Subscriptions
4445import junit.framework.TestCase.assertNull
4546import junit.framework.TestCase.assertTrue
47+ import kotlinx.coroutines.flow.MutableStateFlow
4648import kotlinx.coroutines.test.runTest
4749import org.junit.Assert.assertEquals
4850import org.junit.Before
@@ -73,12 +75,16 @@ class SpecialUrlDetectorImplTest {
7375
7476 val mockDuckChat: DuckChat = mock()
7577
78+ val mockDuckAiFeature: DuckAiFeatureState = mock()
79+
7680 val mockAIChatQueryDetectionFeature: AIChatQueryDetectionFeature = mock()
7781
7882 val mockAIChatQueryDetectionFeatureToggle: Toggle = mock()
7983
8084 val androidBrowserConfigFeature: AndroidBrowserConfigFeature = FakeFeatureToggleFactory .create(AndroidBrowserConfigFeature ::class .java)
8185
86+ private val mockDuckAiFullScreenMode = MutableStateFlow (false )
87+
8288 @Before
8389 fun setup () = runTest {
8490 testee = spy(
@@ -92,12 +98,14 @@ class SpecialUrlDetectorImplTest {
9298 duckChat = mockDuckChat,
9399 aiChatQueryDetectionFeature = mockAIChatQueryDetectionFeature,
94100 androidBrowserConfigFeature = androidBrowserConfigFeature,
101+ duckAiFeatureState = mockDuckAiFeature,
95102 ),
96103 )
97104 whenever(mockPackageManager.queryIntentActivities(any(), anyInt())).thenReturn(emptyList())
98105 whenever(mockDuckPlayer.willNavigateToDuckPlayer(any())).thenReturn(false )
99106 whenever(mockAIChatQueryDetectionFeatureToggle.isEnabled()).thenReturn(false )
100107 whenever(mockAIChatQueryDetectionFeature.self()).thenReturn(mockAIChatQueryDetectionFeatureToggle)
108+ whenever(mockDuckAiFeature.showFullScreenMode).thenReturn(mockDuckAiFullScreenMode)
101109 androidBrowserConfigFeature.handleIntentScheme().setRawStoredState(State (true ))
102110 androidBrowserConfigFeature.validateIntentResolution().setRawStoredState(State (true ))
103111 }
0 commit comments