From 895f9874c9497ba4100ef963c594e8812d849296 Mon Sep 17 00:00:00 2001 From: Mike Scamell Date: Tue, 3 Sep 2024 17:49:40 +0100 Subject: [PATCH] fix tests adding tests for the screen will be in another PR --- .../store/FakeShowOnAppLaunchOptionDataStore.kt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/src/test/java/com/duckduckgo/app/generalsettings/showonapplaunch/store/FakeShowOnAppLaunchOptionDataStore.kt b/app/src/test/java/com/duckduckgo/app/generalsettings/showonapplaunch/store/FakeShowOnAppLaunchOptionDataStore.kt index bbb7b11517c3..51261a3d6e70 100644 --- a/app/src/test/java/com/duckduckgo/app/generalsettings/showonapplaunch/store/FakeShowOnAppLaunchOptionDataStore.kt +++ b/app/src/test/java/com/duckduckgo/app/generalsettings/showonapplaunch/store/FakeShowOnAppLaunchOptionDataStore.kt @@ -26,9 +26,17 @@ class FakeShowOnAppLaunchOptionDataStore : ShowOnAppLaunchOptionDataStore { private var currentOptionStateFlow = MutableStateFlow(null) + private var currentSpecificPageUrl = MutableStateFlow("duckduckgo.com") + override val optionFlow: Flow = currentOptionStateFlow.asStateFlow().filterNotNull() + override val specificPageUrlFlow: Flow = currentSpecificPageUrl.asStateFlow() + override suspend fun setShowOnAppLaunchOption(showOnAppLaunchOption: ShowOnAppLaunchOption) { currentOptionStateFlow.value = showOnAppLaunchOption } + + override suspend fun setSpecificPageUrl(url: String) { + currentSpecificPageUrl.value = url + } }