mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Room Member is now an interface SDK update (#711)
* migrated to the usage of a Protocol for the RoomMember * removed unused file * code improvement * sliding sync new states * sdk bump * fix for tests * fixing tests * package resolved rollback * rollback package.resolved * fixed a mistakenly removed dependency * Revert "fixed a mistakenly removed dependency" This reverts commit 096d9da6142d8117bc1dfa6d5bbbd797b43b31ad. * removing unnecessary Identifiable conformance * pr suggestions * pr comment
This commit is contained in:
@@ -118,7 +118,23 @@ private class MockMediaLoadingClient: ClientProtocol {
|
||||
func startSync(timelineLimit: UInt16?) { }
|
||||
|
||||
func createRoom(request: MatrixRustSDK.CreateRoomParameters) throws -> String { fatalError() }
|
||||
|
||||
|
||||
func getDmRoom(userId: String) throws -> MatrixRustSDK.Room? {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
func ignoreUser(userId: String) throws {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
func searchUsers(searchTerm: String, limit: UInt64) throws -> MatrixRustSDK.SearchUsersResults {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
func unignoreUser(userId: String) throws {
|
||||
fatalError()
|
||||
}
|
||||
|
||||
// swiftlint:disable:next function_parameter_count
|
||||
func setPusher(identifiers: MatrixRustSDK.PusherIdentifiers,
|
||||
kind: MatrixRustSDK.PusherKind,
|
||||
|
||||
@@ -30,7 +30,8 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testLeaveRoomTappedWhenPublic() async {
|
||||
roomProxyMock = RoomProxyMock(with: .init(displayName: "Test", isPublic: true, members: [.mockBob, .mockAlice]))
|
||||
let mockedMembers: [RoomMemberProxyMock] = [.mockBob, .mockAlice]
|
||||
roomProxyMock = RoomProxyMock(with: .init(displayName: "Test", isPublic: true, members: mockedMembers))
|
||||
viewModel = RoomDetailsViewModel(roomProxy: roomProxyMock, mediaProvider: MockMediaProvider())
|
||||
context.send(viewAction: .processTapLeave)
|
||||
await Task.yield()
|
||||
@@ -39,7 +40,8 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
}
|
||||
|
||||
func testLeavRoomTappedWhenRoomNotPublic() async {
|
||||
roomProxyMock = RoomProxyMock(with: .init(displayName: "Test", isPublic: false, members: [.mockBob, .mockAlice]))
|
||||
let mockedMembers: [RoomMemberProxyMock] = [.mockBob, .mockAlice]
|
||||
roomProxyMock = RoomProxyMock(with: .init(displayName: "Test", isPublic: false, members: mockedMembers))
|
||||
viewModel = RoomDetailsViewModel(roomProxy: roomProxyMock, mediaProvider: MockMediaProvider())
|
||||
context.send(viewAction: .processTapLeave)
|
||||
await Task.yield()
|
||||
|
||||
Reference in New Issue
Block a user