Invite people in an existing room (#915)

* Handle power levels

* Add “invite” button in RoomMembersListScreen

* Refactor DI in RoomDetailsScreenCoordinator

* Add navigation to “select people” coordinator

* Add InviteUsersScreenRoomContext

* Add invite user by id api

* Updare InviteUsersScreenRoomContext

* Support disabled state on FormButtonStyles

* Handle membership in UserProfileCell

* Fix conflicts

* Refactor RoomContext -> RoomType

* Refactor UserProfileCell

* Add invite action

* Setup navigation to user flow coordinator

* Add invite logic

* Fix test build errors

* Address comments

* Fix localisations

* Update required state

* Handle error

* Move invite logic in RoomDetailsScreenCoordinator

* Add navigation from room’s members list

* Fix UTs

* Fix missing display name in RoomMemberDetails

* Add user indicator

* Add feature flag

* Add RoomDetailsViewModel UTs

* Add room details ui tests

* Add InviteUsersViewModelTests UTs

* Add UI tests

* Update UI tests

* Empty commit
This commit is contained in:
Alfonso Grillo
2023-05-22 16:03:07 +02:00
committed by GitHub
parent 8ed8cf6f0c
commit d9e0f36aeb
58 changed files with 708 additions and 172 deletions
@@ -29,4 +29,16 @@ class InviteUsersScreenUITests: XCTestCase {
app.collectionViews.firstMatch.cells.element(boundBy: 1).tap()
try await app.assertScreenshot(.inviteUsers, step: 1)
}
func testInviteUsers() async throws {
let app = Application.launch(.inviteUsersInRoom)
app.collectionViews.firstMatch.cells.element(boundBy: 1).tap()
try await app.assertScreenshot(.inviteUsersInRoom, step: 1)
}
func testInviteUserExistingMembers() async throws {
let app = Application.launch(.inviteUsersInRoomExistingMembers)
app.collectionViews.firstMatch.cells.element(boundBy: 1).tap()
try await app.assertScreenshot(.inviteUsersInRoomExistingMembers, step: 1)
}
}
@@ -34,6 +34,13 @@ class RoomDetailsScreenUITests: XCTestCase {
XCTAssert(app.buttons[A11yIdentifiers.roomDetailsScreen.people].waitForExistence(timeout: 1))
try await app.assertScreenshot(.roomDetailsScreenWithRoomAvatar)
}
func testInitialStateComponentsWithInvite() async throws {
let app = Application.launch(.roomDetailsScreenWithInvite)
XCTAssert(app.buttons[A11yIdentifiers.roomDetailsScreen.invite].waitForExistence(timeout: 1))
try await app.assertScreenshot(.roomDetailsScreenWithInvite)
}
func testInitialStateComponentsDmDetails() async throws {
let app = Application.launch(.roomDetailsScreenDmDetails)
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5998aef45c8d50471c13c400b07f172f2c47760f1896cdc1d26d73a7bdcd6e1e
size 108653
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5998aef45c8d50471c13c400b07f172f2c47760f1896cdc1d26d73a7bdcd6e1e
size 108653
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6047011ae61868f6d4ddce792dcdc41ed98ea22f277823de9e65a7f3336481d5
size 97139
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9afaa98b21ab14e513ef00a5826891c34edf424271ea0ef736353967120d1467
size 97265
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a2540eb953c411f815d3eea12b559fe5cc7632af644b841f1487d5379d0efc3
size 133083
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a2540eb953c411f815d3eea12b559fe5cc7632af644b841f1487d5379d0efc3
size 133083
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e0e8a9421366b6cfc72443ab9d7ee96ffe0b81ada3cd7ed48b911fae4cccf845
size 112719
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:03ac9acfa2dd004be4389c02b6760d35fcdff0bc75a3a3d67e820ab719a2d0f0
size 120758
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:871a7cdcab72ffd00146d252eac9eb00309158af303457ca260bf194741d0fd7
size 111420
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:871a7cdcab72ffd00146d252eac9eb00309158af303457ca260bf194741d0fd7
size 111420
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6b14407efd99162bdd2ad4b859896cdf11b8bf98fc3522e85ae399e909f39c22
size 103057
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f9e75b96549882fdc8e154c6782d855e9c761439db9647e4a60f3db3475b7d89
size 111269
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8f4003754398e766a8190e9856da6905adccd84cda9b2733a80d66cb1e7b9258
size 136980
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8f4003754398e766a8190e9856da6905adccd84cda9b2733a80d66cb1e7b9258
size 136980
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fe3a4bfcb6ea5b31f8640df8fc8aa5eecc197a6e314d296f3636f26a155aaba4
size 117935
@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4e95327be10fc4925a6d43045d91cda86a1898fa745a4117573cfc4add17ebc3
size 150407