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
+11 -11
View File
@@ -11,9 +11,9 @@ import XCTest
class UserSessionScreenTests: XCTestCase {
let firstRoomName = "Foundation 🔭🪐🌌"
let firstSpaceName = "The Foundation"
let firstSpaceRoomName = "Company Room"
let firstSubspaceName = "Company Space"
let firstSubspaceRoomName = "Management"
let unjoinedSpaceRoomName = "Company Room"
let joinedSubspaceName = "Joined Space"
let joinedSubspaceRoomName = "Management"
enum Step {
static let homeScreen = 1
@@ -87,24 +87,24 @@ class UserSessionScreenTests: XCTestCase {
try await Task.sleep(for: .seconds(1))
try await app.assertScreenshot(step: Step.spaceScreen)
app.buttons[A11yIdentifiers.spaceListScreen.spaceRoomName(firstSubspaceName)].tap()
XCTAssert(app.staticTexts[firstSubspaceName].waitForExistence(timeout: 5.0))
app.buttons[A11yIdentifiers.spaceListScreen.spaceRoomName(joinedSubspaceName)].tap()
XCTAssert(app.staticTexts[joinedSubspaceName].waitForExistence(timeout: 5.0))
try await Task.sleep(for: .seconds(1))
try await app.assertScreenshot(step: Step.subspaceScreen)
app.buttons[A11yIdentifiers.spaceListScreen.spaceRoomName(firstSubspaceRoomName)].tap()
XCTAssert(app.staticTexts[firstSubspaceRoomName].waitForExistence(timeout: 5.0))
app.buttons[A11yIdentifiers.spaceListScreen.spaceRoomName(joinedSubspaceRoomName)].tap()
XCTAssert(app.staticTexts[joinedSubspaceRoomName].waitForExistence(timeout: 5.0))
try await Task.sleep(for: .seconds(1))
try await app.assertScreenshot(step: Step.subspaceRoomScreen)
app.navigationBars.buttons[firstSubspaceName].firstMatch.tap(.center)
XCTAssert(app.staticTexts[firstSubspaceName].waitForExistence(timeout: 5.0))
app.navigationBars.buttons[joinedSubspaceName].firstMatch.tap(.center)
XCTAssert(app.staticTexts[joinedSubspaceName].waitForExistence(timeout: 5.0))
app.navigationBars.buttons[firstSpaceName].firstMatch.tap(.center)
XCTAssert(app.staticTexts[firstSpaceName].waitForExistence(timeout: 5.0))
app.buttons[A11yIdentifiers.spaceListScreen.spaceRoomName(firstSpaceRoomName)].tap()
XCTAssert(app.staticTexts[firstSpaceRoomName].waitForExistence(timeout: 5.0))
app.buttons[A11yIdentifiers.spaceListScreen.spaceRoomName(unjoinedSpaceRoomName)].tap()
XCTAssert(app.staticTexts[unjoinedSpaceRoomName].waitForExistence(timeout: 5.0))
try await Task.sleep(for: .seconds(1))
try await app.assertScreenshot(step: Step.spaceJoinRoomScreen)
}
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ef257a3d7f03a0eaee4e4354c847c90cbc9d0f9d5c52767d1d49d200232337b0
size 274101
oid sha256:411d73e47a4c33cca4ad4a80f234707a11bb2090bd33d081bf0cc4702356b864
size 277762
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:869be3a8f6ed1705de9fa6d37b6ce0a2e143a6f53a5b439f7cf67e93cf2d082f
size 109237
oid sha256:1f1d0f742cd7ed94b8c20f7b4bb7d2d9aeee77b15118b04f4c14f914db142b62
size 115249