Add the JoinRoomScreen into the SpaceFlowCoordinator. (#4513)

* Add the JoinRoomScreen into the SpaceFlowCoordinator.

The screen needs further work to make the join work.

* Fix the tests completing the join flow with the right action.
This commit is contained in:
Doug
2025-09-17 15:12:45 +01:00
committed by GitHub
parent c4de609ad7
commit 27f4c25194
22 changed files with 260 additions and 92 deletions
@@ -15900,15 +15900,15 @@ class SpaceServiceProxyMock: SpaceServiceProxyProtocol, @unchecked Sendable {
//MARK: - spaceRoomList
var spaceRoomListForUnderlyingCallsCount = 0
var spaceRoomListForCallsCount: Int {
var spaceRoomListSpaceIDUnderlyingCallsCount = 0
var spaceRoomListSpaceIDCallsCount: Int {
get {
if Thread.isMainThread {
return spaceRoomListForUnderlyingCallsCount
return spaceRoomListSpaceIDUnderlyingCallsCount
} else {
var returnValue: Int? = nil
DispatchQueue.main.sync {
returnValue = spaceRoomListForUnderlyingCallsCount
returnValue = spaceRoomListSpaceIDUnderlyingCallsCount
}
return returnValue!
@@ -15916,29 +15916,29 @@ class SpaceServiceProxyMock: SpaceServiceProxyProtocol, @unchecked Sendable {
}
set {
if Thread.isMainThread {
spaceRoomListForUnderlyingCallsCount = newValue
spaceRoomListSpaceIDUnderlyingCallsCount = newValue
} else {
DispatchQueue.main.sync {
spaceRoomListForUnderlyingCallsCount = newValue
spaceRoomListSpaceIDUnderlyingCallsCount = newValue
}
}
}
}
var spaceRoomListForCalled: Bool {
return spaceRoomListForCallsCount > 0
var spaceRoomListSpaceIDCalled: Bool {
return spaceRoomListSpaceIDCallsCount > 0
}
var spaceRoomListForReceivedSpaceRoomProxy: SpaceRoomProxyProtocol?
var spaceRoomListForReceivedInvocations: [SpaceRoomProxyProtocol] = []
var spaceRoomListSpaceIDReceivedSpaceID: String?
var spaceRoomListSpaceIDReceivedInvocations: [String] = []
var spaceRoomListForUnderlyingReturnValue: Result<SpaceRoomListProxyProtocol, SpaceServiceProxyError>!
var spaceRoomListForReturnValue: Result<SpaceRoomListProxyProtocol, SpaceServiceProxyError>! {
var spaceRoomListSpaceIDUnderlyingReturnValue: Result<SpaceRoomListProxyProtocol, SpaceServiceProxyError>!
var spaceRoomListSpaceIDReturnValue: Result<SpaceRoomListProxyProtocol, SpaceServiceProxyError>! {
get {
if Thread.isMainThread {
return spaceRoomListForUnderlyingReturnValue
return spaceRoomListSpaceIDUnderlyingReturnValue
} else {
var returnValue: Result<SpaceRoomListProxyProtocol, SpaceServiceProxyError>? = nil
DispatchQueue.main.sync {
returnValue = spaceRoomListForUnderlyingReturnValue
returnValue = spaceRoomListSpaceIDUnderlyingReturnValue
}
return returnValue!
@@ -15946,26 +15946,26 @@ class SpaceServiceProxyMock: SpaceServiceProxyProtocol, @unchecked Sendable {
}
set {
if Thread.isMainThread {
spaceRoomListForUnderlyingReturnValue = newValue
spaceRoomListSpaceIDUnderlyingReturnValue = newValue
} else {
DispatchQueue.main.sync {
spaceRoomListForUnderlyingReturnValue = newValue
spaceRoomListSpaceIDUnderlyingReturnValue = newValue
}
}
}
}
var spaceRoomListForClosure: ((SpaceRoomProxyProtocol) async -> Result<SpaceRoomListProxyProtocol, SpaceServiceProxyError>)?
var spaceRoomListSpaceIDClosure: ((String) async -> Result<SpaceRoomListProxyProtocol, SpaceServiceProxyError>)?
func spaceRoomList(for spaceRoomProxy: SpaceRoomProxyProtocol) async -> Result<SpaceRoomListProxyProtocol, SpaceServiceProxyError> {
spaceRoomListForCallsCount += 1
spaceRoomListForReceivedSpaceRoomProxy = spaceRoomProxy
func spaceRoomList(spaceID: String) async -> Result<SpaceRoomListProxyProtocol, SpaceServiceProxyError> {
spaceRoomListSpaceIDCallsCount += 1
spaceRoomListSpaceIDReceivedSpaceID = spaceID
DispatchQueue.main.async {
self.spaceRoomListForReceivedInvocations.append(spaceRoomProxy)
self.spaceRoomListSpaceIDReceivedInvocations.append(spaceID)
}
if let spaceRoomListForClosure = spaceRoomListForClosure {
return await spaceRoomListForClosure(spaceRoomProxy)
if let spaceRoomListSpaceIDClosure = spaceRoomListSpaceIDClosure {
return await spaceRoomListSpaceIDClosure(spaceID)
} else {
return spaceRoomListForReturnValue
return spaceRoomListSpaceIDReturnValue
}
}
}