mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Verify Element X with an existing Element Classic account. (#5374)
* Read and import the secrets from ClassicAppAccounts. * Record snapshots. * Add some documentation, tidy up tests and fix the dismissal of the backup instructions. * Workaround flakey tests (the fulfilments weren't always firing). * Allow a custom Classic App deep link URL to be configured.
This commit is contained in:
@@ -9,10 +9,18 @@ import Foundation
|
||||
import MatrixRustSDK
|
||||
|
||||
extension ClassicAppManagerMock {
|
||||
struct Configuration { }
|
||||
struct Configuration {
|
||||
var accounts: [ClassicAppAccount]
|
||||
var availableSecrets: ClassicAppAccount.AvailableSecrets = .complete
|
||||
var secretsBundle: SecretsBundleWithUserId?
|
||||
}
|
||||
|
||||
convenience init(_ configuration: Configuration) {
|
||||
self.init()
|
||||
|
||||
loadAccountsClosure = { configuration.accounts }
|
||||
availableSecretsForReturnValue = configuration.availableSecrets
|
||||
secretsBundleForReturnValue = configuration.secretsBundle
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +30,7 @@ extension ClassicAppAccount {
|
||||
displayName: "Alice",
|
||||
avatarURL: nil,
|
||||
serverName: "matrix.org",
|
||||
homeserverURL: "https://matrix-client.matrix.org/",
|
||||
homeserverURL: "https://matrix-client.matrix.org",
|
||||
cryptoStoreURL: .cachesDirectory,
|
||||
cryptoStorePassphrase: "1234567890",
|
||||
accessToken: "accessToken")
|
||||
@@ -33,7 +41,7 @@ extension ClassicAppAccount {
|
||||
displayName: "Dan",
|
||||
avatarURL: .mockMXCUserAvatar,
|
||||
serverName: "matrix.org",
|
||||
homeserverURL: "https://matrix-client.matrix.org/",
|
||||
homeserverURL: "https://matrix-client.matrix.org",
|
||||
cryptoStoreURL: .cachesDirectory,
|
||||
cryptoStorePassphrase: "1234567890",
|
||||
accessToken: "accessToken")
|
||||
|
||||
Reference in New Issue
Block a user