Add RoomRolesAndPermissionsFlowCoordinator. (#2539)

This commit is contained in:
Doug
2024-03-08 12:25:43 +00:00
committed by GitHub
parent b54d87efd5
commit 5ec63e901d
43 changed files with 490 additions and 44 deletions
@@ -0,0 +1,56 @@
//
// Copyright 2024 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.
//
import XCTest
@MainActor
class RoomRolesAndPermissionsUITests: XCTestCase {
var app: XCUIApplication!
@MainActor enum Step {
static let rolesAndPermissions = 0
static let administratorsRole = 1
static let moderatorsRole = 2
static let roomDetailsPermissions = 3
static let messagesAndContentPermissions = 4
static let memberModerationPermissions = 5
}
func testFlow() async throws {
app = Application.launch(.roomRolesAndPermissionsFlow)
try await app.assertScreenshot(.roomRolesAndPermissionsFlow, step: Step.rolesAndPermissions)
app.buttons[A11yIdentifiers.roomRolesAndPermissionsScreen.administrators].tap()
try await app.assertScreenshot(.roomRolesAndPermissionsFlow, step: Step.administratorsRole)
app.navigationBars.buttons.element(boundBy: 0).tap()
app.buttons[A11yIdentifiers.roomRolesAndPermissionsScreen.moderators].tap()
try await app.assertScreenshot(.roomRolesAndPermissionsFlow, step: Step.moderatorsRole)
app.navigationBars.buttons.element(boundBy: 0).tap()
app.buttons[A11yIdentifiers.roomRolesAndPermissionsScreen.roomDetails].tap()
try await app.assertScreenshot(.roomRolesAndPermissionsFlow, step: Step.roomDetailsPermissions)
app.navigationBars.buttons.element(boundBy: 0).tap()
app.buttons[A11yIdentifiers.roomRolesAndPermissionsScreen.messagesAndContent].tap()
try await app.assertScreenshot(.roomRolesAndPermissionsFlow, step: Step.messagesAndContentPermissions)
app.navigationBars.buttons.element(boundBy: 0).tap()
app.buttons[A11yIdentifiers.roomRolesAndPermissionsScreen.memberModeration].tap()
try await app.assertScreenshot(.roomRolesAndPermissionsFlow, step: Step.memberModerationPermissions)
}
}
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:56cf7b98d83fd41c0748a7ceff82b3bd39c766fa1a03e5eb3a1ad5c154f3569e
size 107293
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6c308bcee54de0745343888fbba4a3e81191210b9f94bd2321e078e6254f66ea
size 139455
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1e6d8f7ec2e54e6a0e902fb6e8de29bce6f44466bd1c3ca184e628637d60d791
size 141623
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9edb60aa8fe4f07da5e7ca1f44d5c461ec52e9c29b98b78a9abd9a01c2c89405
size 112872
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6c25af572834b339745080f03d4ce2318a30f5f79ad37144b522aaa2b32d6833
size 95336
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ce42b2995c72025759021035f7db3295adab3fe3a0c7b90e6e794cbf3ed8280
size 108328
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e187115b066f0942cae48f685c0dc5d2cdc53e994cd1aef297d77db8c2a631c0
size 131763
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f089620ba53ff2ca82906f3e0fb48e10d30c1361bf4fccfcd39da2ef94c39779
size 166898
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:145d34a90da16c1832a0969c8ac5b3e5b0b7d4ece6f7ad9458f8130013c5122b
size 170216
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0bfa92fc9e3318bde12337702904c8b5231daa362d810bc9623bb297990dbf02
size 135469
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:be5ada770c951e7483f2b1c101774e7e2077cc844eaf2013f2113ee3f3cab558
size 109500
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ae777a41147832977a16110115a37d6a9fd22105f8c9b0324fdb1c1ad27a37e9
size 129864
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:86357579aa94aac5c1d8843b06d9287b2aab0b758d6605d92a2c181f4805ac6b
size 116079
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ab199d1b69f3731c67f43a9b9bc54cbc00a31f41d084383de618e276eb8844e4
size 140934
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4e1dba096d136d86b03205791fd1a6fa5512d8eb05a4f794360dd7e82ce2f3a8
size 143435
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d6b24eab850b3703a9dee828b7aa5fc5e458c3998889d4efea0dc043da63b7dc
size 125320
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:37640f16e3b52c138bffd571ef0567d673384131cc9c2a7a3fa703662b9dc58e
size 99735
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:39c2108b87d28348ccd596adb2cb36ef546f9bc785d7c1a3c321d236da6cdbdf
size 115426
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:31774d04e9f5e39f2d930e064e38cc1d0d258516104687e456b81755e06d02a2
size 153398
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1da36569570dcaa2aaf3fa00d1f9f4bd22e7bdf5dfb253c959b96064d21dd80e
size 169036
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:623c1782386ae300a2dc7f33d5c1480e84a947875a5c0af1d217b6098efa135c
size 172592
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8013a8cb823b9c56e8fed84971e25ca21f9f31785e138b7e0d9767f81b29e936
size 160126
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0ddce2faa0548cb422fa3204725e96fbc1414f065e1b444fcf8cdac1e6df02c2
size 124452
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c8f4bab98b03214787e139597f3b255ee5abe9320035e0168ff12ab6927925e9
size 152549