Allow joined rooms to be pushed within a space. (#4460)

* Allow joined rooms to be pushed within a space.

* Push a room in the space flow tests.

Also fixes some snapshots stale snapshots.

* Show the selected space/room within a space and set a custom title view.
This commit is contained in:
Doug
2025-09-03 17:48:49 +01:00
committed by GitHub
parent 8d069fb74c
commit 039084966a
28 changed files with 170 additions and 44 deletions

View File

@@ -14,6 +14,7 @@ struct ClientProxyMockConfiguration {
var userID: String = RoomMemberProxyMock.mockMe.userID
var deviceID: String?
var roomSummaryProvider: RoomSummaryProviderProtocol = RoomSummaryProviderMock(.init())
var joinedSpaceRooms: [SpaceRoomProxyProtocol] = []
var roomDirectorySearchProxy: RoomDirectorySearchProxyProtocol?
var recoveryState: SecureBackupRecoveryState = .enabled
@@ -92,11 +93,13 @@ extension ClientProxyMock {
spaceService = SpaceServiceProxyMock(.init())
roomForIdentifierClosure = { [weak self] identifier in
guard let room = self?.roomSummaryProvider.roomListPublisher.value.first(where: { $0.id == identifier }) else {
return nil
if let room = self?.roomSummaryProvider.roomListPublisher.value.first(where: { $0.id == identifier }) {
await .joined(JoinedRoomProxyMock(.init(id: room.id, name: room.name)))
} else if let spaceRoom = configuration.joinedSpaceRooms.first(where: { $0.id == identifier }) {
await .joined(JoinedRoomProxyMock(.init(id: spaceRoom.id, name: spaceRoom.name)))
} else {
nil
}
return await .joined(JoinedRoomProxyMock(.init(id: room.id, name: room.name)))
}
userIdentityForReturnValue = .success(UserIdentityProxyMock(configuration: .init()))