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:
Doug
2026-04-13 15:30:09 +01:00
committed by GitHub
parent 001a389f51
commit 7c812201cb
40 changed files with 947 additions and 103 deletions
@@ -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")