mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Use server name from user id function (#6082)
update sdk and use the new server from user id function from the sdk
This commit is contained in:
@@ -44,6 +44,23 @@ struct ServerSelectionScreenViewModelTests {
|
||||
#expect(service.homeserver.value == .mockMatrixDotOrg)
|
||||
}
|
||||
|
||||
@Test
|
||||
mutating func selectForLoginUsingMatrixID() async throws {
|
||||
// Given a view model for login.
|
||||
try setup(authenticationFlow: .login)
|
||||
#expect(service.homeserver.value.loginMode == .unknown)
|
||||
|
||||
// When entering a Matrix ID instead of an account provider.
|
||||
context.homeserverAddress = "@alice:matrix.org"
|
||||
let deferred = deferFulfillment(viewModel.actions) { $0.isContinueWithOAuth }
|
||||
context.send(viewAction: .confirm)
|
||||
try await deferred.fulfill()
|
||||
|
||||
// Then the homeserver from the ID should be used.
|
||||
#expect(clientFactory.makeAuthenticationClientHomeserverAddressSessionDirectoriesPassphraseClientSessionDelegateAppSettingsAppHooksReceivedArguments?.homeserverAddress == "matrix.org")
|
||||
#expect(service.homeserver.value == .mockMatrixDotOrg)
|
||||
}
|
||||
|
||||
@Test
|
||||
mutating func loginNotSupportedAlert() async throws {
|
||||
// Given a view model for login.
|
||||
|
||||
Reference in New Issue
Block a user