Allow joined rooms to be pushed within a space. (#4460)

* Allow joined rooms to be pushed within a space.

* Push a room in the space flow tests.

Also fixes some snapshots stale snapshots.

* Show the selected space/room within a space and set a custom title view.
This commit is contained in:
Doug
2025-09-03 17:48:49 +01:00
committed by GitHub
parent 927aea4bfe
commit 53eb1c1718
28 changed files with 170 additions and 44 deletions
@@ -12,6 +12,7 @@ class UserSessionScreenTests: XCTestCase {
let firstRoomName = "Foundation 🔭🪐🌌"
let firstSpaceName = "The Foundation"
let firstSubspaceName = "Company Space"
let firstSubspaceRoomName = "Management"
enum Step {
static let homeScreen = 1
@@ -21,6 +22,7 @@ class UserSessionScreenTests: XCTestCase {
static let spaceList = 5
static let spaceScreen = 6
static let subspaceScreen = 7
static let subspaceRoomScreen = 8
}
func testUserSessionFlows() async throws {
@@ -69,6 +71,8 @@ class UserSessionScreenTests: XCTestCase {
func testSpaceExploration() async throws {
let app = Application.launch(.userSessionSpacesFlow)
app.swipeDown() // Make sure the header shows a large title
try await app.assertScreenshot(step: Step.spacesTabBar)
// app.tabBars doesn't work on iPadOS 18 😐
@@ -85,5 +89,10 @@ class UserSessionScreenTests: XCTestCase {
XCTAssert(app.staticTexts[firstSubspaceName].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))
try await Task.sleep(for: .seconds(1))
try await app.assertScreenshot(step: Step.subspaceRoomScreen)
}
}