diff --git a/BitwardenShared/UI/Platform/Application/Support/Localizations/en.lproj/Localizable.strings b/BitwardenShared/UI/Platform/Application/Support/Localizations/en.lproj/Localizable.strings index 5eba960aa..540493991 100644 --- a/BitwardenShared/UI/Platform/Application/Support/Localizations/en.lproj/Localizable.strings +++ b/BitwardenShared/UI/Platform/Application/Support/Localizations/en.lproj/Localizable.strings @@ -1020,9 +1020,14 @@ "ExportYourSavedLogins" = "Export your saved logins"; "OnYourComputerLogInToYourCurrentBrowserOrPasswordManager" = "On your computer, **log in to your current browser or password manager.**"; "ExportYourPasswordsThisOptionIsUsuallyFoundInYourSettings" = "**Export your passwords.** This option is usually found in your settings."; -"SelectImportDataInTheWebAppThenDoneToFinishSyncing" = "**Select Import data** in the web app, then Done to finish syncing."; +"SaveTheExportedFileSomewhereOnYourComputerYouCanFindEasily" = "**Save the exported file** somewhere on your computer you can find easily."; "YoullDeleteThisFileAfterImportIsComplete" = "You’ll delete this file after import is complete."; "NeedHelpCheckOutImportHelp" = "Need help? Check out **[import help](%1$@)**"; "LogInToBitwarden" = "Log in to Bitwarden"; "OnYourComputerOpenANewBrowserTabAndGoTo" = "On your computer, open a new browser tab and **go to %1$@**"; "LogInToTheBitwardenWebApp" = "**Log in to the Bitwarden web app.**"; +"ImportLoginsToBitwarden" = "Import logins to Bitwarden"; +"InTheBitwardenNavigationFindTheToolsOptionAndSelectImportData" = "In the Bitwarden navigation, **find the Tools option** and **select Import data.**"; +"FillOutTheFormAndImportYourSavedPasswordFile" = "Fill out the form and **import your saved password file.**"; +"SelectImportDataInTheWebAppThenDoneToFinishSyncing" = "**Select Import data** in the web app, then **Done** to finish syncing."; +"ForYourSecurityBeSureToDeleteYourSavedPasswordFile" = "For your security, be sure to **delete your saved password file.**"; diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsProcessorTests.swift b/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsProcessorTests.swift index 082e3c703..b0ec260be 100644 --- a/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsProcessorTests.swift +++ b/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsProcessorTests.swift @@ -51,15 +51,21 @@ class ImportLoginsProcessorTests: BitwardenTestCase { subject.receive(.advanceNextPage) XCTAssertEqual(subject.state.page, .step2) + subject.receive(.advanceNextPage) + XCTAssertEqual(subject.state.page, .step3) + // TODO: PM-11159 Sync vault subject.receive(.advanceNextPage) - XCTAssertEqual(subject.state.page, .step2) + XCTAssertEqual(subject.state.page, .step3) } /// `receive(_:)` with `.advancePreviousPage` advances to the previous page. @MainActor func test_receive_advancePreviousPage() { - subject.state.page = .step2 + subject.state.page = .step3 + + subject.receive(.advancePreviousPage) + XCTAssertEqual(subject.state.page, .step2) subject.receive(.advancePreviousPage) XCTAssertEqual(subject.state.page, .step1) diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsState.swift b/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsState.swift index ea79ae017..bef1e23e3 100644 --- a/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsState.swift +++ b/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsState.swift @@ -11,6 +11,7 @@ struct ImportLoginsState: Equatable, Sendable { case intro case step1 case step2 + case step3 /// The page before the current one. var previous: Page? { diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsView.swift b/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsView.swift index 654dd92b6..ef888e4fa 100644 --- a/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsView.swift +++ b/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsView.swift @@ -21,6 +21,7 @@ struct ImportLoginsView: View { case .intro: intro() case .step1: step1() case .step2: step2() + case .step3: step3() } } .transition(.opacity) @@ -72,7 +73,7 @@ struct ImportLoginsView: View { NumberedListRow(title: Localizations.onYourComputerLogInToYourCurrentBrowserOrPasswordManager) NumberedListRow(title: Localizations.exportYourPasswordsThisOptionIsUsuallyFoundInYourSettings) NumberedListRow( - title: Localizations.selectImportDataInTheWebAppThenDoneToFinishSyncing, + title: Localizations.saveTheExportedFileSomewhereOnYourComputerYouCanFindEasily, subtitle: Localizations.youllDeleteThisFileAfterImportIsComplete ) } @@ -87,6 +88,17 @@ struct ImportLoginsView: View { } } + /// The step 3 page view. + @ViewBuilder + private func step3() -> some View { + stepView(step: 3, title: Localizations.importLoginsToBitwarden) { + NumberedListRow(title: Localizations.inTheBitwardenNavigationFindTheToolsOptionAndSelectImportData) + NumberedListRow(title: Localizations.fillOutTheFormAndImportYourSavedPasswordFile) + NumberedListRow(title: Localizations.selectImportDataInTheWebAppThenDoneToFinishSyncing) + NumberedListRow(title: Localizations.forYourSecurityBeSureToDeleteYourSavedPasswordFile) + } + } + /// Returns a scroll view for displaying the instructions for a step. /// /// - Parameters: @@ -154,4 +166,9 @@ struct ImportLoginsView: View { ImportLoginsView(store: Store(processor: StateProcessor(state: ImportLoginsState(page: .step2)))) .navStackWrapped } + +#Preview("Step 3") { + ImportLoginsView(store: Store(processor: StateProcessor(state: ImportLoginsState(page: .step3)))) + .navStackWrapped +} #endif diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsViewTests.swift b/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsViewTests.swift index 528a95a53..1a361dc63 100644 --- a/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsViewTests.swift +++ b/BitwardenShared/UI/Vault/Vault/ImportLogins/ImportLoginsViewTests.swift @@ -102,4 +102,14 @@ class ImportLoginsViewTests: BitwardenTestCase { as: [.defaultPortrait, .defaultPortraitDark, .tallPortraitAX5(heightMultiple: 2), .defaultLandscape] ) } + + /// The import logins step 3 page renders correctly. + @MainActor + func test_snapshot_importLoginsStep3() { + processor.state.page = .step3 + assertSnapshots( + of: subject.navStackWrapped, + as: [.defaultPortrait, .defaultPortraitDark, .tallPortraitAX5(heightMultiple: 2.5), .defaultLandscape] + ) + } } diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.1.png b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.1.png index 00308c4ed..62fd7dc6f 100644 Binary files a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.1.png and b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.1.png differ diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.2.png b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.2.png index fb9e4078f..78deaf43c 100644 Binary files a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.2.png and b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.2.png differ diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.3.png b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.3.png index d333b4498..8bb0f7730 100644 Binary files a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.3.png and b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.3.png differ diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.4.png b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.4.png index 366d48cae..377085ec5 100644 Binary files a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.4.png and b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep1.4.png differ diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.1.png b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.1.png new file mode 100644 index 000000000..1b89d6c7a Binary files /dev/null and b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.1.png differ diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.2.png b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.2.png new file mode 100644 index 000000000..ed628faf6 Binary files /dev/null and b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.2.png differ diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.3.png b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.3.png new file mode 100644 index 000000000..7f4b4c91d Binary files /dev/null and b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.3.png differ diff --git a/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.4.png b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.4.png new file mode 100644 index 000000000..06a755ccf Binary files /dev/null and b/BitwardenShared/UI/Vault/Vault/ImportLogins/__Snapshots__/ImportLoginsViewTests/test_snapshot_importLoginsStep3.4.png differ