Add a way to tweak MAS url.
This commit is contained in:
parent
79eb28d10a
commit
eafd94e4a6
19 changed files with 60 additions and 7 deletions
|
|
@ -30,6 +30,7 @@ class FakeEnterpriseService(
|
|||
private val firebasePushGatewayResult: () -> String? = { lambdaError() },
|
||||
private val unifiedPushDefaultPushGatewayResult: () -> String? = { lambdaError() },
|
||||
private val getNoisyNotificationChannelIdResult: (SessionId?) -> String? = { lambdaError() },
|
||||
private val tweakMasUrlResult: (String, String) -> String = { _, _ -> lambdaError() },
|
||||
) : EnterpriseService {
|
||||
private val brandColorState = MutableStateFlow(initialBrandColor)
|
||||
private val semanticColorsState = MutableStateFlow(initialSemanticColors)
|
||||
|
|
@ -38,6 +39,10 @@ class FakeEnterpriseService(
|
|||
isEnterpriseUserResult(sessionId)
|
||||
}
|
||||
|
||||
override suspend fun tweakMasUrl(url: String, homeserver: String): String = simulateLongTask {
|
||||
tweakMasUrlResult(url, homeserver)
|
||||
}
|
||||
|
||||
override fun defaultHomeserverList(): List<String> {
|
||||
return defaultHomeserverListResult()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,10 +14,15 @@ import io.element.android.tests.testutils.simulateLongTask
|
|||
|
||||
class FakeSessionEnterpriseService(
|
||||
private val isElementCallAvailableResult: () -> Boolean = { lambdaError() },
|
||||
private val tweakMasUrlResult: (String) -> String = { lambdaError() },
|
||||
) : SessionEnterpriseService {
|
||||
override suspend fun init() {
|
||||
}
|
||||
|
||||
override suspend fun tweakMasUrl(url: String): String = simulateLongTask {
|
||||
tweakMasUrlResult(url)
|
||||
}
|
||||
|
||||
override suspend fun isElementCallAvailable(): Boolean = simulateLongTask {
|
||||
isElementCallAvailableResult()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue