2022-12-19 15:39:33 +03:00
|
|
|
//
|
2024-09-06 16:34:30 +03:00
|
|
|
// Copyright 2022-2024 New Vector Ltd.
|
2022-12-19 15:39:33 +03:00
|
|
|
//
|
2024-09-06 16:34:30 +03:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
// Please see LICENSE in the repository root for full details.
|
2022-12-19 15:39:33 +03:00
|
|
|
//
|
|
|
|
|
2023-03-24 20:27:47 +01:00
|
|
|
import XCTest
|
2022-12-19 15:39:33 +03:00
|
|
|
|
2023-05-15 15:42:40 +02:00
|
|
|
@MainActor
|
2023-03-24 20:27:47 +01:00
|
|
|
class RoomMembersListScreenUITests: XCTestCase {
|
2023-05-15 15:42:40 +02:00
|
|
|
func testJoinedAndInvitedMembers() async throws {
|
2023-05-12 15:12:59 +02:00
|
|
|
let app = Application.launch(.roomMembersListScreenPendingInvites)
|
|
|
|
|
2023-05-15 15:42:40 +02:00
|
|
|
try await app.assertScreenshot(.roomMembersListScreenPendingInvites)
|
2023-05-12 15:12:59 +02:00
|
|
|
}
|
|
|
|
|
2023-05-15 15:42:40 +02:00
|
|
|
func testSearchInvitedMember() async throws {
|
2023-05-12 15:12:59 +02:00
|
|
|
let app = Application.launch(.roomMembersListScreenPendingInvites)
|
|
|
|
|
|
|
|
let searchBar = app.searchFields.firstMatch
|
2024-10-10 08:38:40 +01:00
|
|
|
searchBar.clearAndTypeText("alice\n", app: app)
|
2023-05-12 15:12:59 +02:00
|
|
|
|
2023-05-15 15:42:40 +02:00
|
|
|
try await app.assertScreenshot(.roomMembersListScreenPendingInvites, step: 1)
|
2023-05-12 15:12:59 +02:00
|
|
|
}
|
|
|
|
|
2023-05-15 15:42:40 +02:00
|
|
|
func testSearchJoinedMember() async throws {
|
2023-05-12 15:12:59 +02:00
|
|
|
let app = Application.launch(.roomMembersListScreenPendingInvites)
|
|
|
|
|
|
|
|
let searchBar = app.searchFields.firstMatch
|
2024-10-10 08:38:40 +01:00
|
|
|
searchBar.clearAndTypeText("bob\n", app: app)
|
2023-05-12 15:12:59 +02:00
|
|
|
|
2023-05-15 15:42:40 +02:00
|
|
|
try await app.assertScreenshot(.roomMembersListScreenPendingInvites, step: 2)
|
2023-05-12 15:12:59 +02:00
|
|
|
}
|
2022-12-19 15:39:33 +03:00
|
|
|
}
|