Re-write the space flow state machine configuration and cover it more in UI tests. (#5098)

* Use the old state machine configuration style.

* Test starting the space settings flow in UI tests.

* Test starting the create space room flow in UI tests.
This commit is contained in:
Doug
2026-02-12 13:19:20 +00:00
committed by GitHub
parent 92a5fb395c
commit b34832f7f8
11 changed files with 186 additions and 146 deletions
@@ -22,6 +22,7 @@ extension SpaceServiceProxyMock {
var joinedParentSpaces: [SpaceServiceRoom] = []
var editableSpaces: [SpaceServiceRoom] = []
var spaceRoomLists: [String: SpaceRoomListProxyMock] = [:]
var spaceRooms: [SpaceServiceRoom] = []
var leaveSpaceRooms: [LeaveSpaceRoom] = []
}
@@ -46,7 +47,8 @@ extension SpaceServiceProxyMock {
leaveHandle: LeaveSpaceHandleSDKMock(.init(rooms: configuration.leaveSpaceRooms))))
}
spaceForIdentifierSpaceIDClosure = { spaceID in
.success(configuration.topLevelSpaces.first { $0.id == spaceID })
let space = configuration.topLevelSpaces.first { $0.id == spaceID } ?? configuration.spaceRooms.first { $0.id == spaceID }
return .success(space)
}
addChildToReturnValue = .success(())
removeChildFromReturnValue = .success(())
@@ -70,6 +72,7 @@ extension SpaceServiceProxyMock.Configuration {
return .init(topLevelSpaces: .mockJoinedSpaces,
spaceFilters: spaceFilters,
spaceRoomLists: .init(uniqueKeysWithValues: spaceRoomLists + subSpaceRoomLists))
spaceRoomLists: .init(uniqueKeysWithValues: spaceRoomLists + subSpaceRoomLists),
spaceRooms: .mockSpaceList)
}
}