Preview Tests (#1768)

* preview testing

* removed some views that are not really testabl in UnitTests and improved other tests
This commit is contained in:
Mauro
2023-09-20 17:33:31 +02:00
committed by GitHub
parent 612a28b7e2
commit 9d91cd4fc0
294 changed files with 1312 additions and 121 deletions
@@ -182,7 +182,7 @@ private extension View {
}
}
struct HomeScreenRoomCell_Previews: PreviewProvider {
struct HomeScreenRoomCell_Previews: PreviewProvider, TestablePreview {
static var previews: some View {
let summaryProvider = MockRoomSummaryProvider(state: .loaded(.mockRooms))
@@ -205,7 +205,7 @@ struct HomeScreenRoomCell_Previews: PreviewProvider {
roomId: details.id,
name: details.name,
hasUnreads: details.unreadNotificationCount > 0,
timestamp: Date.now.formattedMinimal(),
timestamp: Date(timeIntervalSinceReferenceDate: 0).formattedMinimal(),
lastMessage: details.lastMessage,
notificationMode: details.notificationMode)
}