mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
The space tweaks continue! (#4606)
* Update a string on the space announcement sheet. * Don't show space rooms after using the join button in the space room list. * Allow the Deselect All button to Select (almost) All as well. * Fix the cells in the leave space sheet when there are only admin rooms.
This commit is contained in:
@@ -149,21 +149,12 @@ class SpaceScreenViewModelTests: XCTestCase {
|
||||
expectation.fulfill()
|
||||
return .success(())
|
||||
}
|
||||
let deferred = deferFulfillment(viewModel.actionsPublisher) { _ in true }
|
||||
let deferredState = deferFulfillment(viewModel.context.observe(\.viewState.joiningRoomIDs), transitionValues: [[selectedSpace.id], []])
|
||||
|
||||
viewModel.context.send(viewAction: .spaceAction(.join(selectedSpace)))
|
||||
|
||||
await fulfillment(of: [expectation])
|
||||
try await deferredState.fulfill()
|
||||
let action = try await deferred.fulfill()
|
||||
|
||||
switch action {
|
||||
case .selectSpace(let spaceRoomListProxy) where spaceRoomListProxy.spaceRoomProxy.id == selectedSpace.id:
|
||||
break
|
||||
default:
|
||||
XCTFail("The join should finish by selecting the space.")
|
||||
}
|
||||
}
|
||||
|
||||
func testJoiningRoom() async throws {
|
||||
@@ -176,21 +167,12 @@ class SpaceScreenViewModelTests: XCTestCase {
|
||||
expectation.fulfill()
|
||||
return .success(())
|
||||
}
|
||||
let deferred = deferFulfillment(viewModel.actionsPublisher) { _ in true }
|
||||
let deferredState = deferFulfillment(viewModel.context.observe(\.viewState.joiningRoomIDs), transitionValues: [[selectedRoom.id], []])
|
||||
|
||||
viewModel.context.send(viewAction: .spaceAction(.join(selectedRoom)))
|
||||
|
||||
await fulfillment(of: [expectation])
|
||||
try await deferredState.fulfill()
|
||||
let action = try await deferred.fulfill()
|
||||
|
||||
switch action {
|
||||
case .selectRoom(let roomID) where roomID == selectedRoom.id:
|
||||
break
|
||||
default:
|
||||
XCTFail("The join should finish by selecting the room.")
|
||||
}
|
||||
}
|
||||
|
||||
func testLeavingSpace() async throws {
|
||||
|
||||
Reference in New Issue
Block a user