From c11e49f962b108b30279948437e9f30e3cf766d4 Mon Sep 17 00:00:00 2001 From: Doug <6060466+pixlwave@users.noreply.github.com> Date: Tue, 29 Oct 2024 15:59:22 +0000 Subject: [PATCH] Tweak the flow for setting up a recovery key. (#3463) * Remove unwanted title. * Update SecureBackupScreen strings. * Update SecureBackupRecoveryKeyScreen. * Show the recovery banner when recovery needs setting up. * Fix SecureBackupScreen title. * Fix timeout on MP4 encoding tests --- .../Localizations/en.lproj/Localizable.strings | 5 +++-- ElementX/Sources/Generated/Strings.swift | 15 ++++++--------- .../HomeScreen/HomeScreenViewModel.swift | 2 +- .../HomeScreen/View/HomeScreenContent.swift | 2 +- ...meScreenRecoveryKeyConfirmationBanner.swift | 18 ++++++++++++++---- ...ecureBackupRecoveryKeyScreenViewModel.swift | 12 ------------ .../View/SecureBackupScreen.swift | 12 ++++++------ ...overyKeyConfirmationBanner-iPad-en-GB.1.png | 3 --- ...nfirmationBanner-iPad-en-GB.Out-of-sync.png | 3 +++ ...mationBanner-iPad-en-GB.Set-up-recovery.png | 3 +++ ...veryKeyConfirmationBanner-iPad-pseudo.1.png | 3 --- ...firmationBanner-iPad-pseudo.Out-of-sync.png | 3 +++ ...ationBanner-iPad-pseudo.Set-up-recovery.png | 3 +++ ...tionBanner-iPhone-16-en-GB.Out-of-sync.png} | 0 ...nBanner-iPhone-16-en-GB.Set-up-recovery.png | 3 +++ ...ionBanner-iPhone-16-pseudo.Out-of-sync.png} | 0 ...Banner-iPhone-16-pseudo.Set-up-recovery.png | 3 +++ ...ecureBackupScreen-iPad-en-GB.Both-setup.png | 4 ++-- ...upScreen-iPad-en-GB.Key-backup-disabled.png | 4 ++-- ...Screen-iPad-en-GB.Only-key-backup-setup.png | 4 ++-- ...upScreen-iPad-en-GB.Recovery-incomplete.png | 4 ++-- ...cureBackupScreen-iPad-pseudo.Both-setup.png | 4 ++-- ...pScreen-iPad-pseudo.Key-backup-disabled.png | 4 ++-- ...creen-iPad-pseudo.Only-key-backup-setup.png | 4 ++-- ...pScreen-iPad-pseudo.Recovery-incomplete.png | 4 ++-- ...BackupScreen-iPhone-16-en-GB.Both-setup.png | 4 ++-- ...een-iPhone-16-en-GB.Key-backup-disabled.png | 4 ++-- ...n-iPhone-16-en-GB.Only-key-backup-setup.png | 4 ++-- ...een-iPhone-16-en-GB.Recovery-incomplete.png | 4 ++-- ...ackupScreen-iPhone-16-pseudo.Both-setup.png | 4 ++-- ...en-iPhone-16-pseudo.Key-backup-disabled.png | 4 ++-- ...-iPhone-16-pseudo.Only-key-backup-setup.png | 4 ++-- ...en-iPhone-16-pseudo.Recovery-incomplete.png | 4 ++-- .../MediaUploadingPreprocessorTests.swift | 8 ++++---- 34 files changed, 85 insertions(+), 77 deletions(-) delete mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.Out-of-sync.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.Set-up-recovery.png delete mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.1.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.Out-of-sync.png create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.Set-up-recovery.png rename PreviewTests/Sources/__Snapshots__/PreviewTests/{test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-en-GB.1.png => test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-en-GB.Out-of-sync.png} (100%) create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-en-GB.Set-up-recovery.png rename PreviewTests/Sources/__Snapshots__/PreviewTests/{test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-pseudo.1.png => test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-pseudo.Out-of-sync.png} (100%) create mode 100644 PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-pseudo.Set-up-recovery.png diff --git a/ElementX/Resources/Localizations/en.lproj/Localizable.strings b/ElementX/Resources/Localizations/en.lproj/Localizable.strings index 9b14f00f5..65ee807bc 100644 --- a/ElementX/Resources/Localizations/en.lproj/Localizable.strings +++ b/ElementX/Resources/Localizations/en.lproj/Localizable.strings @@ -115,9 +115,9 @@ "banner_migrate_to_native_sliding_sync_description" = "Your server now supports a new, faster protocol. Log out and log back in to upgrade now. Doing this now will help you avoid a forced logout when the old protocol is removed later."; "banner_migrate_to_native_sliding_sync_force_logout_title" = "Your homeserver no longer supports the old protocol. Please log out and log back in to continue using the app."; "banner_migrate_to_native_sliding_sync_title" = "Upgrade available"; +"banner_set_up_recovery_content" = "Recover your cryptographic identity and message history with a recovery key if you have lost all your existing devices."; "banner_set_up_recovery_submit" = "Set up recovery"; -"banner.set_up_recovery.content" = "Recover your cryptographic identity and message history with a recovery key if you have lost all your existing devices."; -"banner.set_up_recovery.title" = "Set up recovery to protect your account"; +"banner_set_up_recovery_title" = "Set up recovery to protect your account"; "common_about" = "About"; "common_acceptable_use_policy" = "Acceptable use policy"; "common_advanced_settings" = "Advanced settings"; @@ -459,6 +459,7 @@ "screen_chat_backup_key_backup_action_enable" = "Turn on backup"; "screen_chat_backup_key_backup_description" = "Store your cryptographic identity and message keys securely on the server. This will allow you to view your message history on any new devices. %1$@."; "screen_chat_backup_key_backup_title" = "Key storage"; +"screen_chat_backup_key_storage_disabled_error" = "Key storage must be turned on to set up recovery."; "screen_chat_backup_key_storage_toggle_description" = "Upload keys from this device"; "screen_chat_backup_key_storage_toggle_title" = "Allow key storage"; "screen_chat_backup_recovery_action_change" = "Change recovery key"; diff --git a/ElementX/Sources/Generated/Strings.swift b/ElementX/Sources/Generated/Strings.swift index 087a6974d..6f23eda76 100644 --- a/ElementX/Sources/Generated/Strings.swift +++ b/ElementX/Sources/Generated/Strings.swift @@ -266,8 +266,12 @@ internal enum L10n { internal static var bannerMigrateToNativeSlidingSyncForceLogoutTitle: String { return L10n.tr("Localizable", "banner_migrate_to_native_sliding_sync_force_logout_title") } /// Upgrade available internal static var bannerMigrateToNativeSlidingSyncTitle: String { return L10n.tr("Localizable", "banner_migrate_to_native_sliding_sync_title") } + /// Recover your cryptographic identity and message history with a recovery key if you have lost all your existing devices. + internal static var bannerSetUpRecoveryContent: String { return L10n.tr("Localizable", "banner_set_up_recovery_content") } /// Set up recovery internal static var bannerSetUpRecoverySubmit: String { return L10n.tr("Localizable", "banner_set_up_recovery_submit") } + /// Set up recovery to protect your account + internal static var bannerSetUpRecoveryTitle: String { return L10n.tr("Localizable", "banner_set_up_recovery_title") } /// About internal static var commonAbout: String { return L10n.tr("Localizable", "common_about") } /// Acceptable use policy @@ -1021,6 +1025,8 @@ internal enum L10n { } /// Key storage internal static var screenChatBackupKeyBackupTitle: String { return L10n.tr("Localizable", "screen_chat_backup_key_backup_title") } + /// Key storage must be turned on to set up recovery. + internal static var screenChatBackupKeyStorageDisabledError: String { return L10n.tr("Localizable", "screen_chat_backup_key_storage_disabled_error") } /// Upload keys from this device internal static var screenChatBackupKeyStorageToggleDescription: String { return L10n.tr("Localizable", "screen_chat_backup_key_storage_toggle_description") } /// Allow key storage @@ -2499,15 +2505,6 @@ internal enum L10n { /// Check UnifiedPush internal static var troubleshootNotificationsTestUnifiedPushTitle: String { return L10n.tr("Localizable", "troubleshoot_notifications_test_unified_push_title") } - internal enum Banner { - internal enum SetUpRecovery { - /// Recover your cryptographic identity and message history with a recovery key if you have lost all your existing devices. - internal static var content: String { return L10n.tr("Localizable", "banner.set_up_recovery.content") } - /// Set up recovery to protect your account - internal static var title: String { return L10n.tr("Localizable", "banner.set_up_recovery.title") } - } - } - internal enum Common { /// Copied to clipboard internal static var copiedToClipboard: String { return L10n.tr("Localizable", "common.copied_to_clipboard") } diff --git a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift index b689ce6ca..674559ef8 100644 --- a/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift +++ b/ElementX/Sources/Screens/HomeScreen/HomeScreenViewModel.swift @@ -58,7 +58,7 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol switch (securityState.verificationState, securityState.recoveryState) { case (.verified, .disabled): state.requiresExtraAccountSetup = true - state.securityBannerMode = .none + state.securityBannerMode = .show case (.verified, .incomplete): state.requiresExtraAccountSetup = true diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenContent.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenContent.swift index 7275684dd..68c7408b9 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenContent.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenContent.swift @@ -130,7 +130,7 @@ struct HomeScreenContent: View { if context.viewState.slidingSyncMigrationBannerMode == .show { HomeScreenSlidingSyncMigrationBanner(context: context) } else if context.viewState.securityBannerMode == .show { - HomeScreenRecoveryKeyConfirmationBanner(context: context) + HomeScreenRecoveryKeyConfirmationBanner(requiresExtraAccountSetup: context.viewState.requiresExtraAccountSetup, context: context) } } .background(Color.compound.bgCanvasDefault) diff --git a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift index 12fb8023e..e801e7d21 100644 --- a/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift +++ b/ElementX/Sources/Screens/HomeScreen/View/HomeScreenRecoveryKeyConfirmationBanner.swift @@ -9,13 +9,18 @@ import Combine import SwiftUI struct HomeScreenRecoveryKeyConfirmationBanner: View { + let requiresExtraAccountSetup: Bool var context: HomeScreenViewModel.Context + var title: String { requiresExtraAccountSetup ? L10n.bannerSetUpRecoveryTitle : L10n.confirmRecoveryKeyBannerTitle } + var message: String { requiresExtraAccountSetup ? L10n.bannerSetUpRecoveryContent : L10n.confirmRecoveryKeyBannerMessage } + var actionTitle: String { requiresExtraAccountSetup ? L10n.bannerSetUpRecoverySubmit : L10n.actionContinue } + var body: some View { VStack(alignment: .leading, spacing: 16) { VStack(alignment: .leading, spacing: 4) { HStack(spacing: 16) { - Text(L10n.confirmRecoveryKeyBannerTitle) + Text(title) .font(.compound.bodyLGSemibold) .foregroundColor(.compound.textPrimary) @@ -29,12 +34,12 @@ struct HomeScreenRecoveryKeyConfirmationBanner: View { .frame(width: 12, height: 12) } } - Text(L10n.confirmRecoveryKeyBannerMessage) + Text(message) .font(.compound.bodyMD) .foregroundColor(.compound.textSecondary) } - Button(L10n.actionContinue) { + Button(actionTitle) { context.send(viewAction: .confirmRecoveryKey) } .frame(maxWidth: .infinity) @@ -52,7 +57,12 @@ struct HomeScreenRecoveryKeyConfirmationBanner_Previews: PreviewProvider, Testab static let viewModel = buildViewModel() static var previews: some View { - HomeScreenRecoveryKeyConfirmationBanner(context: viewModel.context) + HomeScreenRecoveryKeyConfirmationBanner(requiresExtraAccountSetup: true, + context: viewModel.context) + .previewDisplayName("Set up recovery") + HomeScreenRecoveryKeyConfirmationBanner(requiresExtraAccountSetup: false, + context: viewModel.context) + .previewDisplayName("Out of sync") } static func buildViewModel() -> HomeScreenViewModel { diff --git a/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/SecureBackupRecoveryKeyScreenViewModel.swift b/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/SecureBackupRecoveryKeyScreenViewModel.swift index 217b27029..3b03ac84c 100644 --- a/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/SecureBackupRecoveryKeyScreenViewModel.swift +++ b/ElementX/Sources/Screens/SecureBackup/SecureBackupRecoveryKeyScreen/SecureBackupRecoveryKeyScreenViewModel.swift @@ -28,18 +28,6 @@ class SecureBackupRecoveryKeyScreenViewModel: SecureBackupRecoveryKeyScreenViewM super.init(initialViewState: .init(isModallyPresented: isModallyPresented, mode: secureBackupController.recoveryState.value.viewMode, bindings: .init())) - - secureBackupController.recoveryState - .receive(on: DispatchQueue.main) - .sink(receiveValue: { [weak self] state in - switch state { - case .settingUp: - self?.showLoadingIndicator() - default: - self?.hideLoadingIndicator() - } - }) - .store(in: &cancellables) } // MARK: - Public diff --git a/ElementX/Sources/Screens/SecureBackup/SecureBackupScreen/View/SecureBackupScreen.swift b/ElementX/Sources/Screens/SecureBackup/SecureBackupScreen/View/SecureBackupScreen.swift index 040d51e78..9ed82cc55 100644 --- a/ElementX/Sources/Screens/SecureBackup/SecureBackupScreen/View/SecureBackupScreen.swift +++ b/ElementX/Sources/Screens/SecureBackup/SecureBackupScreen/View/SecureBackupScreen.swift @@ -28,7 +28,7 @@ struct SecureBackupScreen: View { } } .compoundList() - .navigationTitle(L10n.commonChatBackup) + .navigationTitle(L10n.commonEncryption) .navigationBarTitleDisplayMode(.inline) .alert(item: $context.alertInfo) } @@ -68,8 +68,7 @@ struct SecureBackupScreen: View { } private var keyStorageToggle: some View { - ListRow(label: .plain(title: L10n.screenChatBackupKeyStorageToggleTitle, - description: L10n.screenChatBackupKeyStorageToggleDescription), + ListRow(label: .plain(title: L10n.screenChatBackupKeyStorageToggleTitle), kind: .toggle($context.keyStorageEnabled)) .onChange(of: context.keyStorageEnabled) { _, newValue in context.send(viewAction: .keyStorageToggled(newValue)) @@ -86,7 +85,10 @@ struct SecureBackupScreen: View { iconAlignment: .top), kind: .navigationLink { context.send(viewAction: .recoveryKey) }) case .disabled: - ListRow(label: .plain(title: L10n.screenChatBackupRecoveryActionSetup), + ListRow(label: .default(title: L10n.screenChatBackupRecoveryActionSetup, + description: L10n.screenChatBackupRecoveryActionChangeDescription, + icon: \.key, + iconAlignment: .top), details: .icon(BadgeView(size: 10)), kind: .navigationLink { context.send(viewAction: .recoveryKey) }) case .incomplete: @@ -105,8 +107,6 @@ struct SecureBackupScreen: View { @ViewBuilder private var recoveryKeySectionFooter: some View { switch context.viewState.recoveryState { - case .disabled: - Text(L10n.screenChatBackupRecoveryActionSetupDescription(InfoPlistReader.main.bundleDisplayName)) case .incomplete: Text(L10n.screenChatBackupRecoveryActionConfirmDescription) default: diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.1.png deleted file mode 100644 index 095f8b768..000000000 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:44dd3541075b625b336187423c2ef1fd7330ce3fffb644cf117f12583df4217b -size 95942 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.Out-of-sync.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.Out-of-sync.png new file mode 100644 index 000000000..04511fd48 --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.Out-of-sync.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a4755216723bde1c66554701adf2fefec3f6a4b2949d66ac5875a801b1cd3d8f +size 95958 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.Set-up-recovery.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.Set-up-recovery.png new file mode 100644 index 000000000..217f9b59b --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-en-GB.Set-up-recovery.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e84c622fbb683ac69fa5eb646de5bd340c6105cb08dddd7ab5ecae9d55299583 +size 101351 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.1.png deleted file mode 100644 index bc208b965..000000000 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.1.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:37087b35747692f0ddea27c331644404c9785d6d992fe8c4da46b3a6148d2753 -size 110582 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.Out-of-sync.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.Out-of-sync.png new file mode 100644 index 000000000..394ef0f5f --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.Out-of-sync.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2ea3d780c157fc77da9a75f73d8b482f7d23eb539a67e854dba0ba44deda6173 +size 110663 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.Set-up-recovery.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.Set-up-recovery.png new file mode 100644 index 000000000..9b05eb497 --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPad-pseudo.Set-up-recovery.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:934180921dd8b9c7feeb270fcf3a6d1a2847edba5fc4ea4c820a95b60080c218 +size 119120 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-en-GB.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-en-GB.Out-of-sync.png similarity index 100% rename from PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-en-GB.1.png rename to PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-en-GB.Out-of-sync.png diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-en-GB.Set-up-recovery.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-en-GB.Set-up-recovery.png new file mode 100644 index 000000000..b21ba8455 --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-en-GB.Set-up-recovery.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aec6cef7b010741b2db19085da28d43c3a1a511a658fa957236d665d5aaf6429 +size 65400 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-pseudo.1.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-pseudo.Out-of-sync.png similarity index 100% rename from PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-pseudo.1.png rename to PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-pseudo.Out-of-sync.png diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-pseudo.Set-up-recovery.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-pseudo.Set-up-recovery.png new file mode 100644 index 000000000..9b0638796 --- /dev/null +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_homeScreenRecoveryKeyConfirmationBanner-iPhone-16-pseudo.Set-up-recovery.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:338ad333cedcb48ce8ea5ba3573956f122e9a48fd411249f803b32c8b755a75b +size 92631 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Both-setup.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Both-setup.png index f720b5833..38d9174fd 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Both-setup.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Both-setup.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:41207583349f9c70c02e9f37482445511c597f46d150f6a2c289f0fd731c580b -size 138178 +oid sha256:05bb5553f7cef20942a10107f5122021954f396a5e7866efdaa1fd6e110df4a1 +size 131498 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Key-backup-disabled.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Key-backup-disabled.png index 7eeb523ce..6b413c6e1 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Key-backup-disabled.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Key-backup-disabled.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4574b56fd9c50e2146d6675881dd544e00d9f6ca4b8fa30beed4d42160f833f1 -size 115816 +oid sha256:248c05bf396932033fdc1f2821659988b6cdde1558c4db1ff2e36c6eef9ae02d +size 109322 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Only-key-backup-setup.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Only-key-backup-setup.png index b3ac83ec0..e0d87a463 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Only-key-backup-setup.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Only-key-backup-setup.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0b2432ac9ec6980dfa6618409a401d3a18474c73e37f49b5e29ba3b0dd1d0da0 -size 134492 +oid sha256:b6d9b14acdfe5dc08200d630a6cf5a0ae9d2649926b6840ffd50bde4014b7805 +size 130555 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Recovery-incomplete.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Recovery-incomplete.png index 53cb7f467..8c0190197 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Recovery-incomplete.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-en-GB.Recovery-incomplete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:00b7edaaa02c2ffcb38f79f31e9f265a4c3a837df76858bd6027742b250ed8fb -size 92190 +oid sha256:ff079b6cd61f2c0fb2c4a7a66dd1cdbc297b9ee0951fad8274b0d279507544ca +size 91489 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Both-setup.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Both-setup.png index be34d219c..dad4e9295 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Both-setup.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Both-setup.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53c980680e3a15a67fb5bea95819d42da84dac6c15d346dec0e6e79107a3f3fe -size 169146 +oid sha256:1256574201331ee413d7821b8512fe2e3253849b3f59f25c81ea9c9322380656 +size 161073 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Key-backup-disabled.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Key-backup-disabled.png index 56b4e39de..ae13453f5 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Key-backup-disabled.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Key-backup-disabled.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bc7cb971fef0b09290cd1296b67df22d792634a0f7ff48121e2432e1541ecfff -size 133858 +oid sha256:617075b51396eb2cbaddee74e2673f0b778b04f5f9263c8314dbdde774c6a233 +size 126840 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Only-key-backup-setup.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Only-key-backup-setup.png index ac0323fc8..dad60db57 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Only-key-backup-setup.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Only-key-backup-setup.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b08d094fbf0ca9f671a804a6894659ad9de40f10d376b1903f0449240dd0cf17 -size 163516 +oid sha256:abc0a540d895cdc05a132329f4f9893a7be01f60da1035287be8037befe46c6c +size 160021 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Recovery-incomplete.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Recovery-incomplete.png index 849dd80a4..05a8132d7 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Recovery-incomplete.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPad-pseudo.Recovery-incomplete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4471d33581e3ebb69e7c83f87288f9c67267e84845606066db3e3fc88813fa2a -size 95297 +oid sha256:47fe19f5a821b1ef13956f05ea55ec4f9d22ec8846a5596b318eec1cc0974071 +size 94488 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Both-setup.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Both-setup.png index 023226e67..92e1a2e94 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Both-setup.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Both-setup.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d297f54924748f5aa9d03852553f953647b2d18437a0e598371796fd006f33f5 -size 93416 +oid sha256:c532779ed296a8cc868cde0e0b392ebb55ee385dd1210d1e08aaed591a49f6ce +size 89453 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Key-backup-disabled.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Key-backup-disabled.png index cef726f64..8be7688aa 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Key-backup-disabled.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Key-backup-disabled.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cdef08ee53dcd8b6ba7f599e6264b17ca23add1cc0c824d5bb01ba033223920c -size 70563 +oid sha256:1203fa1008ba94be887f96b286efa557a96577cf30ea0a3f882b9f7576b4c646 +size 66212 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Only-key-backup-setup.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Only-key-backup-setup.png index 53943bc2c..b95b0f08e 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Only-key-backup-setup.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Only-key-backup-setup.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9cdf64b4ce3eedf3b3c9dc78adecf093d562dd839ff94b34550602592d77f6ad -size 89304 +oid sha256:a7539759e9e9bdfd354ffa771de2c6b733697203b9c11b982890554e14a9bbae +size 89693 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Recovery-incomplete.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Recovery-incomplete.png index e016c1794..66dcae71d 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Recovery-incomplete.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-en-GB.Recovery-incomplete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:efa3569bb4408168dc0416e65de3c57406505199f92e7b81ffb697242b439a14 -size 45404 +oid sha256:fb3b0d4c592e7dd54650f94bcdbf1d3763dd946c7f8c753b024a27d24e3d7cdb +size 45210 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Both-setup.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Both-setup.png index 076fe7164..dd6768c64 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Both-setup.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Both-setup.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:96b19939706086621b14c3b28dc7cc6cff5f92363f241e4efd907cbc82aa1ef1 -size 145495 +oid sha256:768a1a253229d73ddf4ce3a26576cc48c252dfcd205bf092eca7779f40d00900 +size 134673 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Key-backup-disabled.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Key-backup-disabled.png index 948ff62d8..9f4565b68 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Key-backup-disabled.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Key-backup-disabled.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d5bfb165c7566fa93c490d775c4d1ce1eed9a78bf78ad2ff7e3029e48684cca1 -size 99065 +oid sha256:9199e5915f3292565b67005b242619cf670f07024c7097ab0e7af7bd5bc23710 +size 89974 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Only-key-backup-setup.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Only-key-backup-setup.png index e988640be..fd2cd2af7 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Only-key-backup-setup.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Only-key-backup-setup.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c08b79a27496e4c14e6a20b3dcc986cd4ac028ad9fbc1560ce331b3b03b1f9c6 -size 135286 +oid sha256:3e3b703d69dfc4c7a231b32eefe63c3fd6010d84cda71ef9b9fd2b9555a21aa6 +size 134095 diff --git a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Recovery-incomplete.png b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Recovery-incomplete.png index d47054de8..c72a721dd 100644 --- a/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Recovery-incomplete.png +++ b/PreviewTests/Sources/__Snapshots__/PreviewTests/test_secureBackupScreen-iPhone-16-pseudo.Recovery-incomplete.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db5c48557a3e20b0767a93b92f0f3a72351f7dd1f2ca6d89afb108aac8ff73d2 -size 53699 +oid sha256:0709b19f855c68b6c72d16a6377ef96a388ffec5604c2d66492c8602cfa11e90 +size 53200 diff --git a/UnitTests/Sources/MediaUploadingPreprocessorTests.swift b/UnitTests/Sources/MediaUploadingPreprocessorTests.swift index f8742fca4..68734fada 100644 --- a/UnitTests/Sources/MediaUploadingPreprocessorTests.swift +++ b/UnitTests/Sources/MediaUploadingPreprocessorTests.swift @@ -46,8 +46,8 @@ final class MediaUploadingPreprocessorTests: XCTestCase { } func testLandscapeMovVideoProcessing() async { - // Allow double the default execution time as we encode the video twice now. - executionTimeAllowance = 120 + // Allow an increased execution time as we encode the video twice now. + executionTimeAllowance = 180 guard let url = Bundle(for: Self.self).url(forResource: "landscape_test_video.mov", withExtension: nil) else { XCTFail("Failed retrieving test asset") @@ -109,8 +109,8 @@ final class MediaUploadingPreprocessorTests: XCTestCase { } func testPortraitMp4VideoProcessing() async { - // Allow double the default execution time as we encode the video twice now. - executionTimeAllowance = 120 + // Allow an increased execution time as we encode the video twice now. + executionTimeAllowance = 180 guard let url = Bundle(for: Self.self).url(forResource: "portrait_test_video.mp4", withExtension: nil) else { XCTFail("Failed retrieving test asset")