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
@@ -29,6 +29,8 @@ class UserSessionScreenTests: XCTestCase {
static let spaceJoinRoomScreen = 9
static let spaceAddRoomsScreen = 10
static let spaceMembersListScreen = 11
static let spaceSettingsScreen = 12
static let createSpaceRoomScreen = 13
}
func testUserSessionFlows() async throws {
@@ -96,6 +98,15 @@ class UserSessionScreenTests: XCTestCase {
try await Task.sleep(for: .seconds(1))
try await app.assertScreenshot(step: Step.subspaceScreen)
app.buttons[A11yIdentifiers.spaceScreen.moreMenu].tap()
app.buttons[A11yIdentifiers.spaceScreen.createRoom].tap()
XCTAssertTrue(app.buttons[A11yIdentifiers.createRoomScreen.cancel].waitForExistence(timeout: 5.0))
try await Task.sleep(for: .seconds(1))
try await app.assertScreenshot(step: Step.createSpaceRoomScreen)
app.buttons[A11yIdentifiers.createRoomScreen.cancel].tap()
XCTAssert(app.staticTexts[joinedSubspaceName].waitForExistence(timeout: 5.0))
app.buttons[A11yIdentifiers.spaceScreen.moreMenu].tap()
app.buttons[A11yIdentifiers.spaceScreen.addExistingRooms].tap()
XCTAssert(app.buttons[A11yIdentifiers.spaceAddRoomsScreen.cancel].waitForExistence(timeout: 5.0))
@@ -114,6 +125,15 @@ class UserSessionScreenTests: XCTestCase {
app.navigationBars.buttons[joinedSubspaceName].firstMatch.tap(.center)
XCTAssert(app.staticTexts[joinedSubspaceName].waitForExistence(timeout: 5.0))
app.buttons[A11yIdentifiers.spaceScreen.moreMenu].tap()
app.buttons[A11yIdentifiers.spaceScreen.settings].tap()
XCTAssert(app.buttons[A11yIdentifiers.spaceSettingsScreen.editBaseInfo].waitForExistence(timeout: 5.0))
try await Task.sleep(for: .seconds(1))
try await app.assertScreenshot(step: Step.spaceSettingsScreen)
app.navigationBars.buttons[joinedSubspaceName].firstMatch.tap(.center)
XCTAssert(app.staticTexts[joinedSubspaceName].waitForExistence(timeout: 5.0))
app.buttons[A11yIdentifiers.spacesScreen.spaceRoomName(joinedSubspaceRoomName)].tap()
XCTAssert(app.buttons[joinedSubspaceRoomName].waitForExistence(timeout: 5.0))
try await Task.sleep(for: .seconds(1))
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a9a76ebfb64858e3e501e7e83c5f807dafc77b4b0e973190809a2240045c973a
size 264477
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b4bed76c5b0fd4ab4ef243a7b4966ce1a8d0396771407ddd6905eb0498895cfe
size 307993
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6d6d275b6bd0e5cbbd5b4c2400ab9bfc5b9c5ecc851149266792ea62f9903018
size 120898
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:638dd34b225e913bb4d13f8191ccac8a15b8f7f106668e859aa7656fd5e66761
size 154018