More integration test tweaks (#2321)

* Improve integration test timings and alert handing

* Add missing `receive(on: DispatchQueue.main` on the invites screen

* Wait for photo library to load

* Disable the preferForLoop swiftformat rule and fix a couple of new warnings

* Delay invites screen snapshotting after dispatch main queue addition
This commit is contained in:
Stefan Ceriu
2024-01-11 16:35:03 +02:00
committed by GitHub
parent ada75ab339
commit fcf78e93e0
7 changed files with 58 additions and 16 deletions
@@ -176,7 +176,7 @@ class NavigationSplitCoordinator: CoordinatorProtocol, ObservableObject, CustomS
case .insert:
break
case .remove(_, let module, _):
self.processCompactLayoutStackModuleRemoval(module)
processCompactLayoutStackModuleRemoval(module)
}
}
}
@@ -80,6 +80,7 @@ class InvitesScreenViewModel: InvitesScreenViewModelType, InvitesScreenViewModel
inviteSummaryProvider.roomListPublisher
.removeDuplicates()
.receive(on: DispatchQueue.main)
.sink { [weak self] roomSummaries in
guard let self else { return }
@@ -73,6 +73,7 @@ struct InvitesScreen_Previews: PreviewProvider, TestablePreview {
NavigationView {
InvitesScreen(context: InvitesScreenViewModel.someInvite.context)
}
.snapshot(delay: 1.0)
.previewDisplayName("Some Invite")
}
}
@@ -15,6 +15,7 @@
//
import Foundation
struct EmojiCategory: Equatable, Identifiable {
let id: String
let emojis: [EmojiItem]