mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 19:44:05 +00:00
Add UI tests for AppLockFlowCoordinator. (#2055)
* Add UITests for the App Lock flow. * Add Notification Signal Fix unwanted imports in UITests.
This commit is contained in:
@@ -40,7 +40,9 @@ class AppLockFlowCoordinator: CoordinatorProtocol {
|
||||
actionsSubject.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
init(appLockService: AppLockServiceProtocol, navigationCoordinator: NavigationRootCoordinator) {
|
||||
init(appLockService: AppLockServiceProtocol,
|
||||
navigationCoordinator: NavigationRootCoordinator,
|
||||
notificationCenter: NotificationCenter = .default) {
|
||||
self.appLockService = appLockService
|
||||
self.navigationCoordinator = navigationCoordinator
|
||||
|
||||
@@ -54,13 +56,13 @@ class AppLockFlowCoordinator: CoordinatorProtocol {
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification)
|
||||
notificationCenter.publisher(for: UIApplication.didEnterBackgroundNotification)
|
||||
.sink { [weak self] _ in
|
||||
self?.applicationDidEnterBackground()
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
NotificationCenter.default.publisher(for: UIApplication.willEnterForegroundNotification)
|
||||
notificationCenter.publisher(for: UIApplication.willEnterForegroundNotification)
|
||||
.sink { [weak self] _ in
|
||||
self?.applicationWillEnterForeground()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user