mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:31:27 +00:00
Accessibiliy Tests part 2 (#4325)
* running all the tests * setting up CI * fixed the workflow * workflow on pull request, just to make it appear * removed the test to run var * fix archived tests name * improved the tests, by filtering out some noise * pr suggestions and added an improvement to the filtering * improved the interrupt handler * improved the UI interruption monitor handler * some more refinement to handle the interruptor + false positive for non human readable labels * reverted wrong commit * ready for review, removed the on pull request check * pr suggestions
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
//
|
||||
|
||||
import Combine
|
||||
import CoreLocation
|
||||
import SwiftUI
|
||||
|
||||
class AccessibilityTestsAppCoordinator: AppCoordinatorProtocol {
|
||||
@@ -53,6 +54,8 @@ class AccessibilityTestsAppCoordinator: AppCoordinatorProtocol {
|
||||
previewsWrapper = .init(name: name, previews: previewType._allPreviews)
|
||||
|
||||
setupSignalling()
|
||||
// Used to perform the request check before the tests run on CI, so it can be immediately dismissed.
|
||||
CLLocationManager().requestWhenInUseAuthorization()
|
||||
}
|
||||
|
||||
func toPresentable() -> AnyView {
|
||||
@@ -143,7 +146,12 @@ struct PreviewsWrapperView: View {
|
||||
|
||||
switch fulfillmentSource {
|
||||
case .publisher(let publisher):
|
||||
_ = await publisher.values.first { $0 == true }
|
||||
_ = await publisher
|
||||
// Not sure whye byt some publisher seem to not properly comunicate their completion,
|
||||
// so we added a timeout. Since we are going to migrate from publishers to stream,
|
||||
// this is a temporary solution
|
||||
.timeout(.seconds(1), scheduler: DispatchQueue.main)
|
||||
.values.first { $0 == true }
|
||||
case .stream(let stream):
|
||||
_ = await stream.first { $0 == true }
|
||||
case .none:
|
||||
|
||||
Reference in New Issue
Block a user