Remove dependency on AppNavigationStateService from DefaultGetCurrentPushProvider
This commit is contained in:
parent
2acc6db70f
commit
705b1b08f2
15 changed files with 66 additions and 70 deletions
|
|
@ -10,6 +10,7 @@ package io.element.android.libraries.troubleshoot.impl
|
|||
import dev.zacsweers.metro.Inject
|
||||
import im.vector.app.features.analytics.plan.NotificationTroubleshoot
|
||||
import io.element.android.libraries.architecture.AsyncAction
|
||||
import io.element.android.libraries.matrix.api.core.SessionId
|
||||
import io.element.android.libraries.push.api.GetCurrentPushProvider
|
||||
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootNavigator
|
||||
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
|
||||
|
|
@ -25,6 +26,7 @@ import kotlinx.coroutines.flow.onEach
|
|||
|
||||
@Inject
|
||||
class TroubleshootTestSuite(
|
||||
private val sessionId: SessionId,
|
||||
private val notificationTroubleshootTests: Set<@JvmSuppressWildcards NotificationTroubleshootTest>,
|
||||
private val getCurrentPushProvider: GetCurrentPushProvider,
|
||||
private val analyticsService: AnalyticsService,
|
||||
|
|
@ -41,7 +43,7 @@ class TroubleshootTestSuite(
|
|||
|
||||
suspend fun start(coroutineScope: CoroutineScope) {
|
||||
val testFilterData = TestFilterData(
|
||||
currentPushProviderName = getCurrentPushProvider.getCurrentPushProvider()
|
||||
currentPushProviderName = getCurrentPushProvider.getCurrentPushProvider(sessionId)
|
||||
)
|
||||
tests = notificationTroubleshootTests
|
||||
.filter { it.isRelevant(testFilterData) }
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ package io.element.android.libraries.troubleshoot.impl
|
|||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import io.element.android.libraries.architecture.AsyncAction
|
||||
import io.element.android.libraries.matrix.test.A_SESSION_ID
|
||||
import io.element.android.libraries.push.test.FakeGetCurrentPushProvider
|
||||
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootNavigator
|
||||
import io.element.android.libraries.troubleshoot.api.test.NotificationTroubleshootTest
|
||||
|
|
@ -170,6 +171,7 @@ private fun createTroubleshootTestSuite(
|
|||
currentPushProvider: String? = null,
|
||||
): TroubleshootTestSuite {
|
||||
return TroubleshootTestSuite(
|
||||
sessionId = A_SESSION_ID,
|
||||
notificationTroubleshootTests = tests,
|
||||
getCurrentPushProvider = FakeGetCurrentPushProvider(currentPushProvider),
|
||||
analyticsService = FakeAnalyticsService(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue