mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user