mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
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))
|
||||
|
||||
Reference in New Issue
Block a user