Replace the existing RoomSummaryProviderMock with a generated one

This commit is contained in:
Stefan Ceriu
2024-02-28 18:38:13 +02:00
committed by Stefan Ceriu
parent 5f0c782ce2
commit 932ba75550
22 changed files with 150 additions and 82 deletions
@@ -174,7 +174,7 @@ private extension View {
}
struct HomeScreenRoomCell_Previews: PreviewProvider, TestablePreview {
static let summaryProviderGeneric = MockRoomSummaryProvider(state: .loaded(.mockRooms))
static let summaryProviderGeneric = RoomSummaryProviderMock(.init(state: .loaded(.mockRooms)))
static let viewModelGeneric = {
let userSession = MockUserSession(clientProxy: ClientProxyMock(.init(userID: "John Doe", roomSummaryProvider: summaryProviderGeneric)),
mediaProvider: MockMediaProvider(),
@@ -187,7 +187,7 @@ struct HomeScreenRoomCell_Previews: PreviewProvider, TestablePreview {
userIndicatorController: ServiceLocator.shared.userIndicatorController)
}()
static let summaryProviderForNotificationsState = MockRoomSummaryProvider(state: .loaded(.mockRoomsWithNotificationsState))
static let summaryProviderForNotificationsState = RoomSummaryProviderMock(.init(state: .loaded(.mockRoomsWithNotificationsState)))
static let viewModelForNotificationsState = {
let userSession = MockUserSession(clientProxy: ClientProxyMock(.init(userID: "John Doe", roomSummaryProvider: summaryProviderForNotificationsState)),
mediaProvider: MockMediaProvider(),