mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user