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:
@@ -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))
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:638dd34b225e913bb4d13f8191ccac8a15b8f7f106668e859aa7656fd5e66761
|
||||
size 154018
|
||||
Reference in New Issue
Block a user