mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Preview Tests (#1768)
* preview testing * removed some views that are not really testabl in UnitTests and improved other tests
This commit is contained in:
@@ -158,17 +158,17 @@ struct RoomDetailsEditScreen: View {
|
||||
|
||||
// MARK: - Previews
|
||||
|
||||
struct RoomDetailsEditScreen_Previews: PreviewProvider {
|
||||
struct RoomDetailsEditScreen_Previews: PreviewProvider, TestablePreview {
|
||||
static let viewModel = RoomDetailsEditScreenViewModel(accountOwner: RoomMemberProxyMock.mockAlice,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
roomProxy: RoomProxyMock(with: .init(name: "Room", displayName: "Room")),
|
||||
roomProxy: RoomProxyMock(with: .init(id: "test_id", name: "Room", displayName: "Room")),
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
|
||||
static let readOnlyViewModel = {
|
||||
let accountOwner = RoomMemberProxyMock.mockOwner(allowedStateEvents: [])
|
||||
return RoomDetailsEditScreenViewModel(accountOwner: accountOwner,
|
||||
mediaProvider: MockMediaProvider(),
|
||||
roomProxy: RoomProxyMock(with: .init(name: "Room", displayName: "Room")),
|
||||
roomProxy: RoomProxyMock(with: .init(id: "test_id", name: "Room", displayName: "Room")),
|
||||
userIndicatorController: UserIndicatorControllerMock.default)
|
||||
}()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user