diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsScreen.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsScreen.kt index e8b43d68f7a..9c993d270b7 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsScreen.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsScreen.kt @@ -171,6 +171,7 @@ fun ImportLoginsScreen( ImportLoginsState.ViewState.ImportStepTwo -> { ImportLoginsStepTwoContent( + vaultUrl = state.currentWebVaultUrl, onBackClick = handler.onMoveToStepOne, onContinueClick = handler.onMoveToStepThree, onHelpClick = handler.onHelpClick, @@ -355,6 +356,7 @@ private fun ImportLoginsStepOneContent( @Composable private fun ImportLoginsStepTwoContent( + vaultUrl: String, onContinueClick: () -> Unit, onBackClick: () -> Unit, onHelpClick: () -> Unit, @@ -363,8 +365,14 @@ private fun ImportLoginsStepTwoContent( val instruction1 = createAnnotatedString( mainString = stringResource( R.string.on_your_computer_open_a_new_browser_tab_and_go_to_vault_bitwarden_com, + vaultUrl, + ), + highlights = listOf( + stringResource( + R.string.go_to_vault_bitwarden_com_highlight, + vaultUrl, + ), ), - highlights = listOf(stringResource(R.string.go_to_vault_bitwarden_com_highlight)), highlightStyle = bitwardenBoldSpanStyle, ) val instruction2Text = stringResource(R.string.log_in_to_the_bitwarden_web_app) @@ -618,12 +626,14 @@ private class ImportLoginsDialogContentPreviewProvider : viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = "vault.bitwarden.com", ), ImportLoginsState( dialogState = ImportLoginsState.DialogState.ImportLater, viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = "vault.bitwarden.com", ), ) } diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsViewModel.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsViewModel.kt index 04c5731aff2..e2e9c45d1cb 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsViewModel.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsViewModel.kt @@ -1,7 +1,9 @@ package com.x8bit.bitwarden.ui.vault.feature.importlogins +import android.net.Uri import androidx.lifecycle.viewModelScope import com.x8bit.bitwarden.R +import com.x8bit.bitwarden.data.platform.repository.EnvironmentRepository import com.x8bit.bitwarden.data.vault.repository.VaultRepository import com.x8bit.bitwarden.data.vault.repository.model.SyncVaultDataResult import com.x8bit.bitwarden.ui.platform.base.BaseViewModel @@ -19,14 +21,21 @@ import javax.inject.Inject @HiltViewModel class ImportLoginsViewModel @Inject constructor( private val vaultRepository: VaultRepository, + private val environmentRepository: EnvironmentRepository, ) : BaseViewModel( - initialState = ImportLoginsState( - null, - viewState = ImportLoginsState.ViewState.InitialContent, - isVaultSyncing = false, - showBottomSheet = false, - ), + initialState = run { + val vaultUrl = environmentRepository.environment.environmentUrlData.webVault + ?: environmentRepository.environment.environmentUrlData.base + ImportLoginsState( + null, + viewState = ImportLoginsState.ViewState.InitialContent, + isVaultSyncing = false, + showBottomSheet = false, + // attempt to trim the scheme of the vault url + currentWebVaultUrl = Uri.parse(vaultUrl).host ?: vaultUrl, + ) + }, ) { override fun handleAction(action: ImportLoginsAction) { when (action) { @@ -197,6 +206,7 @@ data class ImportLoginsState( val viewState: ViewState, val isVaultSyncing: Boolean, val showBottomSheet: Boolean, + val currentWebVaultUrl: String, ) { /** * Dialog states for the [ImportLoginsViewModel]. diff --git a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/components/ImportLoginsInstructionStep.kt b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/components/ImportLoginsInstructionStep.kt index 3bf9a15db8a..3c846e1b11b 100644 --- a/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/components/ImportLoginsInstructionStep.kt +++ b/app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/components/ImportLoginsInstructionStep.kt @@ -74,7 +74,7 @@ fun ImportLoginsInstructionStep( Spacer(Modifier.height(24.dp)) Text( text = createClickableAnnotatedString( - mainString = stringResource(R.string.need_help_checkout_out_import_help), + mainString = stringResource(R.string.need_help_check_out_import_help), highlights = listOf( ClickableTextHighlight( textToHighlight = stringResource(R.string.import_help_highlight), diff --git a/app/src/main/res/values-af-rZA/strings.xml b/app/src/main/res/values-af-rZA/strings.xml index 15fd6dcbb7d..d04a797f703 100644 --- a/app/src/main/res/values-af-rZA/strings.xml +++ b/app/src/main/res/values-af-rZA/strings.xml @@ -1055,7 +1055,7 @@ Wil u na die rekening omskakel? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-ar-rSA/strings.xml b/app/src/main/res/values-ar-rSA/strings.xml index 9498417d411..d4dc00e3645 100644 --- a/app/src/main/res/values-ar-rSA/strings.xml +++ b/app/src/main/res/values-ar-rSA/strings.xml @@ -1055,7 +1055,7 @@ then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-az-rAZ/strings.xml b/app/src/main/res/values-az-rAZ/strings.xml index 6d8a6eab086..f6390eb2813 100644 --- a/app/src/main/res/values-az-rAZ/strings.xml +++ b/app/src/main/res/values-az-rAZ/strings.xml @@ -1054,7 +1054,7 @@ Bu hesaba keçmək istəyirsiniz? \"Hazırdır\"a toxunun Təhlükəsizliyiniz üçün saxlanılmış parol faylınızı sildiyinizə əmin olun. saxlanılmış parol faylınızı silin. - Kömək lazımdır? Daxilə köçürmə üzrə kömək səhifəmizə baxın. + Kömək lazımdır? Daxilə köçürmə üzrə kömək səhifəmizə baxın. daxilə köçürmə üzrə kömək Xaricə köçürdüyünüz faylı kompüterinizdə rahatlıqla tapa biləcəyiniz yerdə saxlayın. Xaricə köçürülən faylı saxlayın diff --git a/app/src/main/res/values-be-rBY/strings.xml b/app/src/main/res/values-be-rBY/strings.xml index 974ea458509..478baf55c5c 100644 --- a/app/src/main/res/values-be-rBY/strings.xml +++ b/app/src/main/res/values-be-rBY/strings.xml @@ -1054,7 +1054,7 @@ then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-bg-rBG/strings.xml b/app/src/main/res/values-bg-rBG/strings.xml index 0bcd52fdf2f..97e7cd893c6 100644 --- a/app/src/main/res/values-bg-rBG/strings.xml +++ b/app/src/main/res/values-bg-rBG/strings.xml @@ -1055,7 +1055,7 @@ а след това натиснете Готово За по-сигурно изтрийте файла със запазените пароли. изтрийте файла със запазените пароли. - Имате ли нужда от помощ? Прегледайте помощта относно внасянето. + Имате ли нужда от помощ? Прегледайте помощта относно внасянето. помощта относно внасянето Запазете изнесения файл някъде в компютъра си, така че да може да го намерите лесно. Запазете изнесения файл diff --git a/app/src/main/res/values-bn-rBD/strings.xml b/app/src/main/res/values-bn-rBD/strings.xml index 558ed585228..e0d9ab1ebcc 100644 --- a/app/src/main/res/values-bn-rBD/strings.xml +++ b/app/src/main/res/values-bn-rBD/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-bs-rBA/strings.xml b/app/src/main/res/values-bs-rBA/strings.xml index 803e63b75d7..8987779c12b 100644 --- a/app/src/main/res/values-bs-rBA/strings.xml +++ b/app/src/main/res/values-bs-rBA/strings.xml @@ -1054,7 +1054,7 @@ Skeniranje će biti izvršeno automatski. then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-ca-rES/strings.xml b/app/src/main/res/values-ca-rES/strings.xml index c57afd1ad59..4cba4133b97 100644 --- a/app/src/main/res/values-ca-rES/strings.xml +++ b/app/src/main/res/values-ca-rES/strings.xml @@ -1055,7 +1055,7 @@ Voleu canviar a aquest compte? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-cs-rCZ/strings.xml b/app/src/main/res/values-cs-rCZ/strings.xml index 938ad0e3c59..ee331f25284 100644 --- a/app/src/main/res/values-cs-rCZ/strings.xml +++ b/app/src/main/res/values-cs-rCZ/strings.xml @@ -1054,7 +1054,7 @@ Chcete se přepnout na tento účet? a poté klepněte na tlačítko Hotovo Z důvodu bezpečnosti nezapomeňte smazat soubor s uloženým heslem. smazat soubor s uloženým heslem. - Potřebujete pomoc? Podívejte se na nápovědu pro import. + Potřebujete pomoc? Podívejte se na nápovědu pro import. nápověda pro import Uložte exportovaný soubor někde na Vašem počítači, kde jej můžete snadno najít. Uložit exportovaný soubor diff --git a/app/src/main/res/values-cy-rGB/strings.xml b/app/src/main/res/values-cy-rGB/strings.xml index 1222a610bd5..0ab2e4e942e 100644 --- a/app/src/main/res/values-cy-rGB/strings.xml +++ b/app/src/main/res/values-cy-rGB/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-da-rDK/strings.xml b/app/src/main/res/values-da-rDK/strings.xml index 53b2ecdc308..5e1263d9792 100644 --- a/app/src/main/res/values-da-rDK/strings.xml +++ b/app/src/main/res/values-da-rDK/strings.xml @@ -1055,7 +1055,7 @@ Skift til denne konto? dernæst Færdig Sørg af sikkerhedshensyn for at slette den gemte adgangskodefil. slet den gemte adgangskodefil. - Behov for hjælp? Tjek import-hjælp ud. + Behov for hjælp? Tjek import-hjælp ud. import-hjælp Gem den eksporterede fil et sted på computeren, hvor man nemt kan finde den. Gem den eksporterede fil diff --git a/app/src/main/res/values-de-rDE/strings.xml b/app/src/main/res/values-de-rDE/strings.xml index 1563b55cf03..a616b327e34 100644 --- a/app/src/main/res/values-de-rDE/strings.xml +++ b/app/src/main/res/values-de-rDE/strings.xml @@ -1054,7 +1054,7 @@ Möchtest du zu diesem Konto wechseln? then Done Zu deiner eigenen Sicherheit solltest du deine gespeicherte Passwortdatei löschen. lösche deine gespeicherte Passwortdatei. - Brauchst du Hilfe? Schau dir die Importhilfe an. + Brauchst du Hilfe? Schau dir die Importhilfe an. Importhilfe Speichere die exportierte Datei irgendwo auf deinem Computer, so dass du sie leicht wiederfinden kannst. Speichere die exportierte Datei diff --git a/app/src/main/res/values-el-rGR/strings.xml b/app/src/main/res/values-el-rGR/strings.xml index d51826e03ec..4913868301d 100644 --- a/app/src/main/res/values-el-rGR/strings.xml +++ b/app/src/main/res/values-el-rGR/strings.xml @@ -1055,7 +1055,7 @@ then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-en-rGB/strings.xml b/app/src/main/res/values-en-rGB/strings.xml index 5c5b8363afb..554ae726d22 100644 --- a/app/src/main/res/values-en-rGB/strings.xml +++ b/app/src/main/res/values-en-rGB/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-en-rIN/strings.xml b/app/src/main/res/values-en-rIN/strings.xml index ad362346ac9..f3810afe68d 100644 --- a/app/src/main/res/values-en-rIN/strings.xml +++ b/app/src/main/res/values-en-rIN/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-es-rES/strings.xml b/app/src/main/res/values-es-rES/strings.xml index 84ca4ba60ea..8dd26364582 100644 --- a/app/src/main/res/values-es-rES/strings.xml +++ b/app/src/main/res/values-es-rES/strings.xml @@ -1056,7 +1056,7 @@ seleccione Agregar TOTP para almacenar la clave de forma segura then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-et-rEE/strings.xml b/app/src/main/res/values-et-rEE/strings.xml index 8b9f6538818..7a19d0420a1 100644 --- a/app/src/main/res/values-et-rEE/strings.xml +++ b/app/src/main/res/values-et-rEE/strings.xml @@ -1055,7 +1055,7 @@ Soovid selle konto peale lülituda? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-eu-rES/strings.xml b/app/src/main/res/values-eu-rES/strings.xml index b4ec404bcae..e79ae1f6226 100644 --- a/app/src/main/res/values-eu-rES/strings.xml +++ b/app/src/main/res/values-eu-rES/strings.xml @@ -1053,7 +1053,7 @@ Kontu honetara aldatu nahi duzu? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-fa-rIR/strings.xml b/app/src/main/res/values-fa-rIR/strings.xml index 8b8dab53496..fa433a22557 100644 --- a/app/src/main/res/values-fa-rIR/strings.xml +++ b/app/src/main/res/values-fa-rIR/strings.xml @@ -1055,7 +1055,7 @@ then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-fi-rFI/strings.xml b/app/src/main/res/values-fi-rFI/strings.xml index ce0f10eadad..173ba1523e1 100644 --- a/app/src/main/res/values-fi-rFI/strings.xml +++ b/app/src/main/res/values-fi-rFI/strings.xml @@ -1055,7 +1055,7 @@ Haluatko vaihtaa tähän tiliin? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-fil-rPH/strings.xml b/app/src/main/res/values-fil-rPH/strings.xml index b89531e1006..ed943c99390 100644 --- a/app/src/main/res/values-fil-rPH/strings.xml +++ b/app/src/main/res/values-fil-rPH/strings.xml @@ -1055,7 +1055,7 @@ Gusto mo bang pumunta sa account na ito? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-fr-rFR/strings.xml b/app/src/main/res/values-fr-rFR/strings.xml index 2c1489787fd..342798b3c65 100644 --- a/app/src/main/res/values-fr-rFR/strings.xml +++ b/app/src/main/res/values-fr-rFR/strings.xml @@ -1055,7 +1055,7 @@ Voulez-vous basculer vers ce compte ? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-gl-rES/strings.xml b/app/src/main/res/values-gl-rES/strings.xml index 5de27233e90..d6a4055f53e 100644 --- a/app/src/main/res/values-gl-rES/strings.xml +++ b/app/src/main/res/values-gl-rES/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-hi-rIN/strings.xml b/app/src/main/res/values-hi-rIN/strings.xml index c206ca976e3..51219ba591a 100644 --- a/app/src/main/res/values-hi-rIN/strings.xml +++ b/app/src/main/res/values-hi-rIN/strings.xml @@ -1054,7 +1054,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-hr-rHR/strings.xml b/app/src/main/res/values-hr-rHR/strings.xml index 5e68727bd0b..95cb4eb0b69 100644 --- a/app/src/main/res/values-hr-rHR/strings.xml +++ b/app/src/main/res/values-hr-rHR/strings.xml @@ -1053,7 +1053,7 @@ then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-hu-rHU/strings.xml b/app/src/main/res/values-hu-rHU/strings.xml index fe96cc9db7b..7ce8fc15bff 100644 --- a/app/src/main/res/values-hu-rHU/strings.xml +++ b/app/src/main/res/values-hu-rHU/strings.xml @@ -1054,7 +1054,7 @@ Szeretnénk átváltani erre a fiókra? majd Kész lehetőség A biztonság érdekében töröljük a mentett jelszó fájlt. a mentett jelszó fájl törlése. - Segítségre van szükség? Nézzük meg az importálás súgót. + Segítségre van szükség? Nézzük meg az importálás súgót. importálás súgó Mentsük el az exportált fájlt olyan helyre a számítógépen, ahol könnyen megtalálhatjuk. Exportált fájl mentése diff --git a/app/src/main/res/values-in-rID/strings.xml b/app/src/main/res/values-in-rID/strings.xml index 847917e9843..9db2ebe7c89 100644 --- a/app/src/main/res/values-in-rID/strings.xml +++ b/app/src/main/res/values-in-rID/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-it-rIT/strings.xml b/app/src/main/res/values-it-rIT/strings.xml index 400eb15d397..007dcb61e7b 100644 --- a/app/src/main/res/values-it-rIT/strings.xml +++ b/app/src/main/res/values-it-rIT/strings.xml @@ -1054,7 +1054,7 @@ Vuoi passare a questo account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-iw-rIL/strings.xml b/app/src/main/res/values-iw-rIL/strings.xml index debc4c8fdfc..2996b93a0af 100644 --- a/app/src/main/res/values-iw-rIL/strings.xml +++ b/app/src/main/res/values-iw-rIL/strings.xml @@ -1058,7 +1058,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-ja-rJP/strings.xml b/app/src/main/res/values-ja-rJP/strings.xml index c58f0bc3cb5..6f392f92b7e 100644 --- a/app/src/main/res/values-ja-rJP/strings.xml +++ b/app/src/main/res/values-ja-rJP/strings.xml @@ -1055,7 +1055,7 @@ then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-ka-rGE/strings.xml b/app/src/main/res/values-ka-rGE/strings.xml index 8df7b6fa188..4f0868f0737 100644 --- a/app/src/main/res/values-ka-rGE/strings.xml +++ b/app/src/main/res/values-ka-rGE/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-kn-rIN/strings.xml b/app/src/main/res/values-kn-rIN/strings.xml index 9379b27ad47..b3168515404 100644 --- a/app/src/main/res/values-kn-rIN/strings.xml +++ b/app/src/main/res/values-kn-rIN/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml index 6ac153be955..e65dbed12f7 100644 --- a/app/src/main/res/values-ko-rKR/strings.xml +++ b/app/src/main/res/values-ko-rKR/strings.xml @@ -1055,7 +1055,7 @@ then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-lt-rLT/strings.xml b/app/src/main/res/values-lt-rLT/strings.xml index a1b3ddd0f5c..822d00ae125 100644 --- a/app/src/main/res/values-lt-rLT/strings.xml +++ b/app/src/main/res/values-lt-rLT/strings.xml @@ -1055,7 +1055,7 @@ Ar norite pereiti prie šios paskyros? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-lv-rLV/strings.xml b/app/src/main/res/values-lv-rLV/strings.xml index c1dbeec304c..acaae33a37e 100644 --- a/app/src/main/res/values-lv-rLV/strings.xml +++ b/app/src/main/res/values-lv-rLV/strings.xml @@ -1055,7 +1055,7 @@ Vai pārslēgties uz šo kontu? tad \"Darīts\" Drošības dēļ jānodrošina, ka paroļu datne tiek izdzēsta. jāizdzēš sava salgabātā paroļu datne. - Nepieciešama palīdzība? Ir vērts ieskatīties ievietošanas palīdzībā. + Nepieciešama palīdzība? Ir vērts ieskatīties ievietošanas palīdzībā. ievietošanas palīdzība Izgūtā datne jāsaglabā kaut kur viegli atrodamā vietā datorā. Izgūtā datne jāsaglabā diff --git a/app/src/main/res/values-ml-rIN/strings.xml b/app/src/main/res/values-ml-rIN/strings.xml index 2d070aa59e7..15fa4cedfb4 100644 --- a/app/src/main/res/values-ml-rIN/strings.xml +++ b/app/src/main/res/values-ml-rIN/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-mr-rIN/strings.xml b/app/src/main/res/values-mr-rIN/strings.xml index 0a24ad5b464..35ecfe350e1 100644 --- a/app/src/main/res/values-mr-rIN/strings.xml +++ b/app/src/main/res/values-mr-rIN/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-my-rMM/strings.xml b/app/src/main/res/values-my-rMM/strings.xml index 8df7b6fa188..4f0868f0737 100644 --- a/app/src/main/res/values-my-rMM/strings.xml +++ b/app/src/main/res/values-my-rMM/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-nb-rNO/strings.xml b/app/src/main/res/values-nb-rNO/strings.xml index cb30f13ffbd..807328f3156 100644 --- a/app/src/main/res/values-nb-rNO/strings.xml +++ b/app/src/main/res/values-nb-rNO/strings.xml @@ -1055,7 +1055,7 @@ Vil du bytte til denne kontoen? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-ne-rNP/strings.xml b/app/src/main/res/values-ne-rNP/strings.xml index 8df7b6fa188..4f0868f0737 100644 --- a/app/src/main/res/values-ne-rNP/strings.xml +++ b/app/src/main/res/values-ne-rNP/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-nl-rNL/strings.xml b/app/src/main/res/values-nl-rNL/strings.xml index 4df2132e249..f1040723fd8 100644 --- a/app/src/main/res/values-nl-rNL/strings.xml +++ b/app/src/main/res/values-nl-rNL/strings.xml @@ -1055,7 +1055,7 @@ Wilt u naar dit account wisselen? dan Klaar Voor je eigen veiligheid, verwijder je opgeslagen wachtwoordbestand. verwijder je opgeslagen wachtwoordbestand. - Hulp nodig? Bekijk importhulp. + Hulp nodig? Bekijk importhulp. importhulp Sla het geëxporteerde bestand ergens op je computer waar je deze gemakkelijk kunt vinden. Exportbestand opslaan diff --git a/app/src/main/res/values-nn-rNO/strings.xml b/app/src/main/res/values-nn-rNO/strings.xml index 05d3c947b9d..10f3ae6c97f 100644 --- a/app/src/main/res/values-nn-rNO/strings.xml +++ b/app/src/main/res/values-nn-rNO/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-or-rIN/strings.xml b/app/src/main/res/values-or-rIN/strings.xml index e8bc4d7ddf8..3fc95038c00 100644 --- a/app/src/main/res/values-or-rIN/strings.xml +++ b/app/src/main/res/values-or-rIN/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-pl-rPL/strings.xml b/app/src/main/res/values-pl-rPL/strings.xml index 493b56ab00d..f9583288c2b 100644 --- a/app/src/main/res/values-pl-rPL/strings.xml +++ b/app/src/main/res/values-pl-rPL/strings.xml @@ -1055,7 +1055,7 @@ Czy chcesz przełączyć się na to konto? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml index 521bd17bbaf..c32882fb53c 100644 --- a/app/src/main/res/values-pt-rBR/strings.xml +++ b/app/src/main/res/values-pt-rBR/strings.xml @@ -1055,7 +1055,7 @@ Você deseja mudar para esta conta? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-pt-rPT/strings.xml b/app/src/main/res/values-pt-rPT/strings.xml index eee168eb9bc..7c44c32c138 100644 --- a/app/src/main/res/values-pt-rPT/strings.xml +++ b/app/src/main/res/values-pt-rPT/strings.xml @@ -1055,7 +1055,7 @@ Anule a subscrição em qualquer altura. em seguida, Concluído Para sua segurança, certifique-se de que elimina o ficheiro de palavras-passe guardadas. elimine o seu ficheiro de palavras-passe guardadas. - Precisa de ajuda? Consulte a ajuda com a importação. + Precisa de ajuda? Consulte a ajuda com a importação. ajuda com a importação Guarde o ficheiro exportado num local do seu computador que possa encontrar facilmente. Guarde o ficheiro exportado diff --git a/app/src/main/res/values-ro-rRO/strings.xml b/app/src/main/res/values-ro-rRO/strings.xml index bde2629ba0f..e7fb44cb2e7 100644 --- a/app/src/main/res/values-ro-rRO/strings.xml +++ b/app/src/main/res/values-ro-rRO/strings.xml @@ -1055,7 +1055,7 @@ Doriți să comutați la acest cont? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-ru-rRU/strings.xml b/app/src/main/res/values-ru-rRU/strings.xml index 639039fd193..518a062e22c 100644 --- a/app/src/main/res/values-ru-rRU/strings.xml +++ b/app/src/main/res/values-ru-rRU/strings.xml @@ -1057,7 +1057,7 @@ затем Готово В целях безопасности не забудьте удалить сохраненный файл с паролями. удалите файл с сохраненными паролями. - Нужна помощь? Ознакомьтесь с помощью по импорту. + Нужна помощь? Ознакомьтесь с помощью по импорту. помощь по импорту Сохраните экспортированный файл на компьютере, где его можно будет легко найти. Сохранить экспортированный файл diff --git a/app/src/main/res/values-si-rLK/strings.xml b/app/src/main/res/values-si-rLK/strings.xml index c94b50eb0d4..09f1684b3cf 100644 --- a/app/src/main/res/values-si-rLK/strings.xml +++ b/app/src/main/res/values-si-rLK/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-sk-rSK/strings.xml b/app/src/main/res/values-sk-rSK/strings.xml index 453b44720d5..b31cc25f55e 100644 --- a/app/src/main/res/values-sk-rSK/strings.xml +++ b/app/src/main/res/values-sk-rSK/strings.xml @@ -1055,7 +1055,7 @@ Chcete prepnúť na tento účet? potom Hotovo V záujme vašej bezpečnosti nezabudnite odstrániť uložený súbor s heslami. odstrániť súbor s uloženými heslami. - Potrebujete pomoc? Pozrite si pomoc pre importovanie. + Potrebujete pomoc? Pozrite si pomoc pre importovanie. pomoc pre importovanie Uložte exportovaný súbor na miesto v počítači, ktoré ľahko nájdete. Uložte exportovaný súbor diff --git a/app/src/main/res/values-sl-rSI/strings.xml b/app/src/main/res/values-sl-rSI/strings.xml index 41060c01b09..9c4171d287f 100644 --- a/app/src/main/res/values-sl-rSI/strings.xml +++ b/app/src/main/res/values-sl-rSI/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-sr-rSP/strings.xml b/app/src/main/res/values-sr-rSP/strings.xml index fb7f9cc92c7..688ace28a3f 100644 --- a/app/src/main/res/values-sr-rSP/strings.xml +++ b/app/src/main/res/values-sr-rSP/strings.xml @@ -1056,7 +1056,7 @@ и после Заврши Ради ваше безбедности, обавезно избришите своју сачувану датотеку лозинке. избришите своју сачувану датотеку лозинке. - Треба вам помоћ? Проверите помоћ за увоз. + Треба вам помоћ? Проверите помоћ за увоз. помоћ за увоз Сачувајте извезену датотеку негде на рачунару где можете лако да пронађете. Сачувајте извезену датотеку diff --git a/app/src/main/res/values-sv-rSE/strings.xml b/app/src/main/res/values-sv-rSE/strings.xml index b1d6ae0bd1a..6460dc24ba7 100644 --- a/app/src/main/res/values-sv-rSE/strings.xml +++ b/app/src/main/res/values-sv-rSE/strings.xml @@ -1056,7 +1056,7 @@ Vill du byta till detta konto? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-ta-rIN/strings.xml b/app/src/main/res/values-ta-rIN/strings.xml index 35414cf184b..8ce86f8472d 100644 --- a/app/src/main/res/values-ta-rIN/strings.xml +++ b/app/src/main/res/values-ta-rIN/strings.xml @@ -1055,7 +1055,7 @@ then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-te-rIN/strings.xml b/app/src/main/res/values-te-rIN/strings.xml index 8df7b6fa188..4f0868f0737 100644 --- a/app/src/main/res/values-te-rIN/strings.xml +++ b/app/src/main/res/values-te-rIN/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-th-rTH/strings.xml b/app/src/main/res/values-th-rTH/strings.xml index 5ab26038e1f..3693679bdb0 100644 --- a/app/src/main/res/values-th-rTH/strings.xml +++ b/app/src/main/res/values-th-rTH/strings.xml @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-tr-rTR/strings.xml b/app/src/main/res/values-tr-rTR/strings.xml index 981406d4e70..fdb1d81a85b 100644 --- a/app/src/main/res/values-tr-rTR/strings.xml +++ b/app/src/main/res/values-tr-rTR/strings.xml @@ -1054,7 +1054,7 @@ Bu hesaba geçmek ister misiniz? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values-uk-rUA/strings.xml b/app/src/main/res/values-uk-rUA/strings.xml index 3ff61b3c54b..d720a1c2e7f 100644 --- a/app/src/main/res/values-uk-rUA/strings.xml +++ b/app/src/main/res/values-uk-rUA/strings.xml @@ -1055,7 +1055,7 @@ потім натисніть Виконано З міркувань безпеки, обов\'язково видаліть збережений файл із паролями. видаліть збережений файл із паролями. - Потрібна допомога? Перегляньте довідку щодо імпорту. + Потрібна допомога? Перегляньте довідку щодо імпорту. довідка щодо імпорту Збережіть експортований файл у легкодоступному місці на цьому комп\'ютері. Збережіть експортований файл diff --git a/app/src/main/res/values-vi-rVN/strings.xml b/app/src/main/res/values-vi-rVN/strings.xml index b66ad1bc6f4..0db9808ae5a 100644 --- a/app/src/main/res/values-vi-rVN/strings.xml +++ b/app/src/main/res/values-vi-rVN/strings.xml @@ -1055,7 +1055,7 @@ Bạn có muốn chuyển sang tài khoản này không? rồi Xong Để bảo mật, hãy xóa file mật khẩu đã lưu. xóa file mật khẩu đã lưu. - Cần trợ giúp? Xem trợ giúp nhập. + Cần trợ giúp? Xem trợ giúp nhập. trợ giúp nhập Lưu file đã xuất trên máy tính để tìm dễ hơn. Lưu file đã xuất diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 4e8d5b9d3fa..24b968aa3b6 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -1055,7 +1055,7 @@ 然后「完成」 为了您的安全,请务必删除已保存的密码文件。 删除已保存的密码文件。 - 需要帮助吗?查看导入帮助。 + 需要帮助吗?查看导入帮助。 导入帮助 将导出的文件保存到您可以在计算机上轻松找到的地方。 保存导出的文件 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index a091e0b439a..b345ee33f0f 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -1055,7 +1055,7 @@ then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Checkout out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 50e9c553b07..81277d4e47a 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1040,8 +1040,8 @@ Do you want to switch to this account? Step 1 of 3 Export your saved logins You’ll delete this file after import is complete. - On your computer, open a new browser tab and go to vault.bitwarden.com - go to vault.bitwarden.com + On your computer, open a new browser tab and go to %1$s + go to %1$s Log in to the Bitwarden web app. Step 2 of 3 Log in to Bitwarden @@ -1055,7 +1055,7 @@ Do you want to switch to this account? then Done For your security, be sure to delete your saved password file. delete your saved password file. - Need help? Checkout out import help. + Need help? Check out import help. import help Save the exported file somewhere on your computer you can find easily. Save the exported file diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsScreenTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsScreenTest.kt index 5b1fd9cb19a..0bf3b4825ef 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsScreenTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsScreenTest.kt @@ -259,6 +259,24 @@ class ImportLoginsScreenTest : BaseComposeTest() { .assertIsDisplayed() } + @Test + fun `Step two content shows correct vault url when vault url is set`() { + val url = "vault.bitwarden.com.testing" + mutableImportLoginsStateFlow.update { + it.copy( + viewState = ImportLoginsState.ViewState.ImportStepTwo, + currentWebVaultUrl = url, + ) + } + composeTestRule + .onNodeWithText("Step 2 of 3") + .assertIsDisplayed() + + composeTestRule + .onNodeWithText(url, substring = true) + .assertIsDisplayed() + } + @Test fun `while on step two correct actions are sent when buttons are clicked`() { mutableImportLoginsStateFlow.update { @@ -472,4 +490,5 @@ private val DEFAULT_STATE = ImportLoginsState( viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = "vault.bitwarden.com", ) diff --git a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsViewModelTest.kt b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsViewModelTest.kt index a53be8adc4d..a18d15acb80 100644 --- a/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsViewModelTest.kt +++ b/app/src/test/java/com/x8bit/bitwarden/ui/vault/feature/importlogins/ImportLoginsViewModelTest.kt @@ -1,26 +1,51 @@ package com.x8bit.bitwarden.ui.vault.feature.importlogins +import android.net.Uri import app.cash.turbine.test import com.x8bit.bitwarden.R +import com.x8bit.bitwarden.data.platform.repository.EnvironmentRepository +import com.x8bit.bitwarden.data.platform.repository.model.Environment import com.x8bit.bitwarden.data.vault.repository.VaultRepository import com.x8bit.bitwarden.data.vault.repository.model.SyncVaultDataResult import com.x8bit.bitwarden.ui.platform.base.BaseViewModelTest import com.x8bit.bitwarden.ui.platform.base.util.asText import io.mockk.coEvery import io.mockk.coVerify +import io.mockk.every import io.mockk.mockk +import io.mockk.mockkStatic +import io.mockk.unmockkStatic import kotlinx.coroutines.test.runTest +import org.junit.jupiter.api.AfterEach import org.junit.jupiter.api.Assertions.assertEquals import org.junit.jupiter.api.Assertions.assertNotNull import org.junit.jupiter.api.Assertions.assertTrue +import org.junit.jupiter.api.BeforeEach import org.junit.jupiter.api.Test class ImportLoginsViewModelTest : BaseViewModelTest() { - private val vaultRepository: VaultRepository = mockk() { + private val vaultRepository: VaultRepository = mockk { coEvery { syncForResult() } returns SyncVaultDataResult.Success(itemsAvailable = true) } + private val environmentRepository: EnvironmentRepository = mockk { + every { environment } returns Environment.Us + } + + @BeforeEach + fun setUp() { + mockkStatic(Uri::parse) + every { Uri.parse(Environment.Us.environmentUrlData.base) } returns mockk { + every { host } returns DEFAULT_VAULT_URL + } + } + + @AfterEach + fun tearDown() { + unmockkStatic(Uri::parse) + } + @Test fun `initial state is correct`() { val viewModel = createViewModel() @@ -40,6 +65,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), viewModel.stateFlow.value, ) @@ -55,6 +81,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), viewModel.stateFlow.value, ) @@ -75,6 +102,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), awaitItem(), ) @@ -85,6 +113,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), awaitItem(), ) @@ -106,6 +135,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), stateFlow.awaitItem(), ) @@ -116,6 +146,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), stateFlow.awaitItem(), ) @@ -141,6 +172,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), awaitItem(), ) @@ -151,6 +183,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.ImportStepOne, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), awaitItem(), ) @@ -191,6 +224,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.ImportStepOne, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), viewModel.stateFlow.value, ) @@ -206,6 +240,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.ImportStepTwo, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), viewModel.stateFlow.value, ) @@ -221,6 +256,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.ImportStepThree, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), viewModel.stateFlow.value, ) @@ -240,6 +276,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), viewModel.stateFlow.value, ) @@ -260,6 +297,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = true, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), awaitItem(), ) @@ -287,6 +325,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = true, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), awaitItem(), ) @@ -305,6 +344,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = true, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), viewModel.stateFlow.value, ) @@ -330,6 +370,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = true, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), awaitItem(), ) @@ -339,6 +380,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), awaitItem(), ) @@ -356,6 +398,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), viewModel.stateFlow.value, ) @@ -378,6 +421,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), viewModel.stateFlow.value, ) @@ -401,6 +445,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = true, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), stateFlow.awaitItem(), ) @@ -410,6 +455,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = true, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), stateFlow.awaitItem(), ) @@ -420,6 +466,7 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, ), stateFlow.awaitItem(), ) @@ -429,12 +476,16 @@ class ImportLoginsViewModelTest : BaseViewModelTest() { private fun createViewModel(): ImportLoginsViewModel = ImportLoginsViewModel( vaultRepository = vaultRepository, + environmentRepository = environmentRepository, ) } +private const val DEFAULT_VAULT_URL = "vault.bitwarden.com" + private val DEFAULT_STATE = ImportLoginsState( dialogState = null, viewState = ImportLoginsState.ViewState.InitialContent, isVaultSyncing = false, showBottomSheet = false, + currentWebVaultUrl = DEFAULT_VAULT_URL, )