mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:02:10 +00:00
Onboarding flow coordinator and FTUE changes (#2578)
Fixes #2595, fixes #2594, fixes #2593, fixes #2592, fixes #2591
This commit is contained in:
@@ -25,11 +25,11 @@ class AnalyticsSettingsScreenViewModelTests: XCTestCase {
|
||||
private var context: AnalyticsSettingsScreenViewModelType.Context!
|
||||
|
||||
override func tearDown() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
}
|
||||
|
||||
@MainActor override func setUpWithError() throws {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
appSettings = AppSettings()
|
||||
let analyticsClient = AnalyticsClientMock()
|
||||
analyticsClient.isRunning = false
|
||||
|
||||
@@ -24,7 +24,7 @@ class AnalyticsTests: XCTestCase {
|
||||
private var bugReportService: BugReportServiceMock!
|
||||
|
||||
override func setUp() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
appSettings = AppSettings()
|
||||
|
||||
bugReportService = BugReportServiceMock()
|
||||
@@ -38,7 +38,7 @@ class AnalyticsTests: XCTestCase {
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
}
|
||||
|
||||
func testAnalyticsPromptNewUser() {
|
||||
|
||||
@@ -28,7 +28,7 @@ class AppLockScreenViewModelTests: XCTestCase {
|
||||
var context: AppLockScreenViewModelType.Context { viewModel.context }
|
||||
|
||||
override func setUp() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
appSettings = AppSettings()
|
||||
keychainController = KeychainControllerMock()
|
||||
appLockService = AppLockService(keychainController: keychainController, appSettings: appSettings)
|
||||
@@ -36,7 +36,7 @@ class AppLockScreenViewModelTests: XCTestCase {
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
}
|
||||
|
||||
func testUnlock() async throws {
|
||||
|
||||
@@ -25,7 +25,7 @@ class AppLockServiceTests: XCTestCase {
|
||||
var service: AppLockService!
|
||||
|
||||
override func setUp() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
appSettings = AppSettings()
|
||||
|
||||
keychainController = KeychainController(service: .tests, accessGroup: InfoPlistReader.main.keychainAccessGroupIdentifier)
|
||||
@@ -36,7 +36,7 @@ class AppLockServiceTests: XCTestCase {
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
}
|
||||
|
||||
// MARK: - PIN Code
|
||||
|
||||
@@ -26,7 +26,7 @@ class AppLockSetupBiometricsScreenViewModelTests: XCTestCase {
|
||||
var context: AppLockSetupBiometricsScreenViewModelType.Context { viewModel.context }
|
||||
|
||||
override func setUp() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
|
||||
appLockService = AppLockServiceMock()
|
||||
appLockService.underlyingIsEnabled = true
|
||||
@@ -36,7 +36,7 @@ class AppLockSetupBiometricsScreenViewModelTests: XCTestCase {
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
}
|
||||
|
||||
func testAllow() async throws {
|
||||
|
||||
@@ -27,13 +27,13 @@ class AppLockSetupPINScreenViewModelTests: XCTestCase {
|
||||
var context: AppLockSetupPINScreenViewModelType.Context { viewModel.context }
|
||||
|
||||
override func setUp() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
keychainController = KeychainControllerMock()
|
||||
appLockService = AppLockService(keychainController: keychainController, appSettings: AppSettings())
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
}
|
||||
|
||||
func testCreatePIN() async throws {
|
||||
|
||||
@@ -23,7 +23,7 @@ class AppRouteURLParserTests: XCTestCase {
|
||||
var appRouteURLParser: AppRouteURLParser!
|
||||
|
||||
override func setUp() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
appSettings = AppSettings()
|
||||
appRouteURLParser = AppRouteURLParser(appSettings: appSettings)
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class ComposerToolbarViewModelTests: XCTestCase {
|
||||
private var completionSuggestionServiceMock: CompletionSuggestionServiceMock!
|
||||
|
||||
override func setUp() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
appSettings = AppSettings()
|
||||
appSettings.richTextEditorEnabled = true
|
||||
ServiceLocator.shared.register(appSettings: appSettings)
|
||||
@@ -42,7 +42,7 @@ class ComposerToolbarViewModelTests: XCTestCase {
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
}
|
||||
|
||||
func testComposerFocus() {
|
||||
|
||||
@@ -41,7 +41,7 @@ class HomeScreenViewModelTests: XCTestCase {
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
}
|
||||
|
||||
func testSelectRoom() async throws {
|
||||
|
||||
@@ -37,7 +37,7 @@ final class NotificationManagerTests: XCTestCase {
|
||||
private var appSettings: AppSettings { ServiceLocator.shared.settings }
|
||||
|
||||
override func setUp() {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
notificationCenter = UserNotificationCenterMock()
|
||||
notificationCenter.requestAuthorizationOptionsReturnValue = true
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ class NotificationSettingsScreenViewModelTests: XCTestCase {
|
||||
private var notificationSettingsProxy: NotificationSettingsProxyMock!
|
||||
|
||||
@MainActor override func setUpWithError() throws {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
|
||||
userNotificationCenter = UserNotificationCenterMock()
|
||||
userNotificationCenter.authorizationStatusReturnValue = .authorized
|
||||
|
||||
@@ -22,7 +22,7 @@ class PermalinkBuilderTests: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
AppSettings.configureWithSuiteName("io.element.elementx.unitests")
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
appSettings = AppSettings()
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class RoomDetailsScreenViewModelTests: XCTestCase {
|
||||
mentionBuilder: MentionBuilder()),
|
||||
appSettings: ServiceLocator.shared.settings)
|
||||
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
}
|
||||
|
||||
func testLeaveRoomTappedWhenPublic() async throws {
|
||||
|
||||
@@ -25,7 +25,7 @@ class RoomScreenViewModelTests: XCTestCase {
|
||||
var cancellables = Set<AnyCancellable>()
|
||||
|
||||
override func setUp() async throws {
|
||||
AppSettings.reset()
|
||||
AppSettings.resetAllSettings()
|
||||
cancellables.removeAll()
|
||||
userIndicatorControllerMock = UserIndicatorControllerMock.default
|
||||
}
|
||||
|
||||
@@ -27,8 +27,7 @@ class SessionVerificationViewModelTests: XCTestCase {
|
||||
|
||||
override func setUpWithError() throws {
|
||||
sessionVerificationController = SessionVerificationControllerProxyMock.configureMock()
|
||||
viewModel = SessionVerificationScreenViewModel(sessionVerificationControllerProxy: sessionVerificationController,
|
||||
recoveryState: .incomplete)
|
||||
viewModel = SessionVerificationScreenViewModel(sessionVerificationControllerProxy: sessionVerificationController)
|
||||
context = viewModel.context
|
||||
}
|
||||
|
||||
@@ -47,7 +46,7 @@ class SessionVerificationViewModelTests: XCTestCase {
|
||||
|
||||
context.send(viewAction: .requestVerification)
|
||||
|
||||
context.send(viewAction: .close)
|
||||
viewModel.stop()
|
||||
|
||||
XCTAssertEqual(context.viewState.verificationState, .cancelling)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user