2022-12-19 15:39:33 +03:00
|
|
|
//
|
|
|
|
// Copyright 2022 New Vector Ltd
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
//
|
|
|
|
|
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
|
|
|
|
searchBar.clearAndTypeText("alice\n")
|
|
|
|
|
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
|
|
|
|
searchBar.clearAndTypeText("bob\n")
|
|
|
|
|
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
|
|
|
}
|