Make sure we display errors when we create a recovery key and it fails (#5079)
* Make sure we display errors when we create a recovery key and it fails * Add another preview for the error state * Update screenshots --------- Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
parent
34848aa7f9
commit
afa01e926b
11 changed files with 86 additions and 11 deletions
|
|
@ -26,7 +26,8 @@ class FakeEncryptionService(
|
|||
private val pinUserIdentityResult: (UserId) -> Result<Unit> = { lambdaError() },
|
||||
private val isUserVerifiedResult: (UserId) -> Result<Boolean> = { lambdaError() },
|
||||
private val withdrawVerificationResult: (UserId) -> Result<Unit> = { lambdaError() },
|
||||
private val getUserIdentityResult: (UserId) -> Result<IdentityState?> = { lambdaError() }
|
||||
private val getUserIdentityResult: (UserId) -> Result<IdentityState?> = { lambdaError() },
|
||||
private val enableRecoveryLambda: (Boolean) -> Result<Unit> = { lambdaError() },
|
||||
) : EncryptionService {
|
||||
private var disableRecoveryFailure: Exception? = null
|
||||
override val backupStateStateFlow: MutableStateFlow<BackupState> = MutableStateFlow(BackupState.UNKNOWN)
|
||||
|
|
@ -87,7 +88,7 @@ class FakeEncryptionService(
|
|||
}
|
||||
|
||||
override suspend fun enableRecovery(waitForBackupsToUpload: Boolean): Result<Unit> = simulateLongTask {
|
||||
return Result.success(Unit)
|
||||
return enableRecoveryLambda(waitForBackupsToUpload)
|
||||
}
|
||||
|
||||
fun givenWaitForBackupUploadSteadyStateFlow(flow: Flow<BackupUploadState>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue