mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Encryption Flow Coordinators. (#3471)
* Manage the secure backup screens with flow coordinators.
* Add UI tests for the EncryptionSettingsFlowCoordinator.
* Realise that the settings flow can't reset anymore and remove the sub-flow 🤦♂️
* Add UI tests for the EncryptionResetFlowCoordinator.
This commit is contained in:
+7
-3
@@ -5,6 +5,7 @@
|
||||
// Please see LICENSE in the repository root for full details.
|
||||
//
|
||||
|
||||
import Combine
|
||||
import Compound
|
||||
import SwiftUI
|
||||
|
||||
@@ -32,9 +33,10 @@ struct EncryptionResetPasswordScreen: View {
|
||||
.padding(16)
|
||||
} bottomContent: {
|
||||
Button(L10n.actionResetIdentity, role: .destructive) {
|
||||
context.send(viewAction: .resetIdentity)
|
||||
context.send(viewAction: .submit)
|
||||
}
|
||||
.buttonStyle(.compound(.primary))
|
||||
.accessibilityIdentifier(A11yIdentifiers.encryptionResetPasswordScreen.submit)
|
||||
}
|
||||
.background()
|
||||
.backgroundStyle(.compound.bgCanvasDefault)
|
||||
@@ -58,8 +60,9 @@ struct EncryptionResetPasswordScreen: View {
|
||||
.focused($textFieldFocus)
|
||||
.submitLabel(.done)
|
||||
.onSubmit {
|
||||
context.send(viewAction: .resetIdentity)
|
||||
context.send(viewAction: .submit)
|
||||
}
|
||||
.accessibilityIdentifier(A11yIdentifiers.encryptionResetPasswordScreen.passwordField)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,7 +70,8 @@ struct EncryptionResetPasswordScreen: View {
|
||||
// MARK: - Previews
|
||||
|
||||
struct EncryptionResetPasswordScreen_Previews: PreviewProvider, TestablePreview {
|
||||
static let viewModel = EncryptionResetPasswordScreenViewModel()
|
||||
static let passwordPublisher = PassthroughSubject<String, Never>()
|
||||
static let viewModel = EncryptionResetPasswordScreenViewModel(passwordPublisher: passwordPublisher)
|
||||
static var previews: some View {
|
||||
NavigationStack {
|
||||
EncryptionResetPasswordScreen(context: viewModel.context)
|
||||
|
||||
Reference in New Issue
Block a user