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 8e6f9f482b
commit 9b5099bd90
11 changed files with 186 additions and 146 deletions

View File

@@ -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))

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:638dd34b225e913bb4d13f8191ccac8a15b8f7f106668e859aa7656fd5e66761
size 154018