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:
Mauro
2026-08-27 16:28:40 +02:00
committed by GitHub
parent efefd549a2
commit 9f7e30820b
8 changed files with 31 additions and 18 deletions
@@ -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.