mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +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:
@@ -46,11 +46,16 @@ extension ClientSDKMock {
|
||||
serverReturnValue = "https://\(configuration.serverAddress)"
|
||||
homeserverReturnValue = configuration.homeserverURL
|
||||
urlForOidcOidcConfigurationPromptLoginHintDeviceIdAdditionalScopesReturnValue = OAuthAuthorizationDataSDKMock(configuration: configuration)
|
||||
loginUsernamePasswordInitialDeviceNameDeviceIdClosure = { username, password, _, _ in
|
||||
loginUsernamePasswordInitialDeviceNameDeviceIdClosure = { [weak self] username, password, _, _ in
|
||||
guard username == configuration.validCredentials.username,
|
||||
password == configuration.validCredentials.password else {
|
||||
throw MockError.generic // use the matrix error
|
||||
}
|
||||
if username.hasPrefix("@"), username.contains(":") {
|
||||
self?.userIdReturnValue = username
|
||||
} else {
|
||||
self?.userIdReturnValue = "@\(username):\(configuration.serverAddress)"
|
||||
}
|
||||
}
|
||||
|
||||
userIdReturnValue = configuration.userID
|
||||
|
||||
Reference in New Issue
Block a user