2023-04-20 16:00:05 +02:00
|
|
|
//
|
2024-09-06 16:34:30 +03:00
|
|
|
// Copyright 2022-2024 New Vector Ltd.
|
2023-04-20 16:00:05 +02:00
|
|
|
//
|
2025-01-06 11:27:37 +01:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
|
|
|
|
// Please see LICENSE files in the repository root for full details.
|
2023-04-20 16:00:05 +02:00
|
|
|
//
|
|
|
|
|
|
|
|
import XCTest
|
|
|
|
|
2023-05-15 16:14:13 +02:00
|
|
|
@MainActor
|
2023-04-20 16:00:05 +02:00
|
|
|
class CreateRoomScreenUITests: XCTestCase {
|
2023-05-15 16:14:13 +02:00
|
|
|
func testLanding() async throws {
|
2023-04-20 16:00:05 +02:00
|
|
|
let app = Application.launch(.createRoom)
|
2025-03-04 17:17:52 +02:00
|
|
|
try await app.assertScreenshot()
|
2023-05-10 16:40:00 +02:00
|
|
|
}
|
|
|
|
|
2023-05-15 16:14:13 +02:00
|
|
|
func testLandingWithoutUsers() async throws {
|
2023-05-10 16:40:00 +02:00
|
|
|
let app = Application.launch(.createRoomNoUsers)
|
2025-03-04 17:17:52 +02:00
|
|
|
try await app.assertScreenshot()
|
2023-04-20 16:00:05 +02:00
|
|
|
}
|
2023-05-11 12:26:53 +02:00
|
|
|
|
2023-05-15 16:14:13 +02:00
|
|
|
func testLongInputNameText() async throws {
|
2023-05-11 12:26:53 +02:00
|
|
|
let app = Application.launch(.createRoom)
|
2023-05-26 17:43:38 +03:00
|
|
|
|
|
|
|
// typeText sometimes misses letters but it's faster than typing one letter at a time
|
|
|
|
// repeat the same letter enough times to avoid that but also to work on iPads
|
2023-05-12 18:38:19 +02:00
|
|
|
app.textFields[A11yIdentifiers.createRoomScreen.roomName].tap()
|
2023-05-26 17:43:38 +03:00
|
|
|
app.textFields[A11yIdentifiers.createRoomScreen.roomName].typeText(.init(repeating: "x", count: 200))
|
2023-06-06 10:03:38 +02:00
|
|
|
app.textFields[A11yIdentifiers.createRoomScreen.roomName].typeText("\n")
|
2025-03-04 17:17:52 +02:00
|
|
|
try await app.assertScreenshot()
|
2023-05-11 12:26:53 +02:00
|
|
|
}
|
2023-04-20 16:00:05 +02:00
|
|
|
}
|