mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Space flow improvements. (#4430)
* Space flow improvements - Use a state machine to select a space. - Add a SpaceFlowCoordinator for recursively presenting subspaces. - Get the spaceRoomListProxy when tapping on the space so we can indicate failures. - Fix the total room count in SpaceListScreen. * Refactor spaceRoom → spaceRoomProxy. * Add a UI test for the Spaces flow.
This commit is contained in:
@@ -577,14 +577,19 @@ class MockScreen: Identifiable {
|
||||
appSettings: ServiceLocator.shared.settings,
|
||||
mediaProvider: MediaProviderMock(configuration: .init()))
|
||||
return SessionVerificationScreenCoordinator(parameters: parameters)
|
||||
case .userSessionScreen, .userSessionScreenReply:
|
||||
case .userSessionScreen, .userSessionScreenReply, .userSessionSpacesFlow:
|
||||
let appSettings: AppSettings = ServiceLocator.shared.settings
|
||||
appSettings.hasRunIdentityConfirmationOnboarding = true
|
||||
appSettings.hasRunNotificationPermissionsOnboarding = true
|
||||
appSettings.analyticsConsentState = .optedOut
|
||||
appSettings.spacesEnabled = true
|
||||
|
||||
let clientProxy = ClientProxyMock(.init(userID: "@mock:client.com", deviceID: "MOCKCLIENT", roomSummaryProvider: RoomSummaryProviderMock(.init(state: .loaded(.mockRooms)))))
|
||||
|
||||
// The tab bar remains hidden for the non-spaces tests as we don't supply any mock spaces.
|
||||
let spaceServiceProxy = SpaceServiceProxyMock(id == .userSessionSpacesFlow ? .populated : .init())
|
||||
clientProxy.spaceService = spaceServiceProxy
|
||||
|
||||
let appMediator = AppMediatorMock.default
|
||||
appMediator.underlyingWindowManager = windowManager
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ enum UITestsScreenIdentifier: String {
|
||||
case startChatWithSearchResults
|
||||
case userSessionScreen
|
||||
case userSessionScreenReply
|
||||
case userSessionSpacesFlow
|
||||
case autoUpdatingTimeline
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user