mirror of
https://github.com/bitwarden/android.git
synced 2026-05-10 05:49:44 -05:00
BITAU-197 Update copy in all Save to Bitwarden scenarios (#271)
This commit is contained in:
@@ -43,14 +43,14 @@ fun SaveManualCodeButtons(
|
||||
ManualCodeEntryState.ButtonState.SaveLocallyPrimary -> {
|
||||
Column {
|
||||
BitwardenFilledButton(
|
||||
label = stringResource(id = R.string.add_code_locally),
|
||||
label = stringResource(id = R.string.save_here),
|
||||
onClick = onSaveLocallyClick,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp),
|
||||
)
|
||||
BitwardenOutlinedButton(
|
||||
label = stringResource(R.string.add_code_to_bitwarden),
|
||||
label = stringResource(R.string.save_to_bitwarden),
|
||||
onClick = onSaveToBitwardenClick,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
@@ -62,14 +62,14 @@ fun SaveManualCodeButtons(
|
||||
ManualCodeEntryState.ButtonState.SaveToBitwardenPrimary -> {
|
||||
Column {
|
||||
BitwardenFilledButton(
|
||||
label = stringResource(id = R.string.add_code_to_bitwarden),
|
||||
label = stringResource(id = R.string.save_to_bitwarden),
|
||||
onClick = onSaveToBitwardenClick,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp),
|
||||
)
|
||||
BitwardenOutlinedButton(
|
||||
label = stringResource(R.string.add_code_locally),
|
||||
label = stringResource(R.string.save_here),
|
||||
onClick = onSaveLocallyClick,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
|
||||
@@ -108,7 +108,7 @@ fun ChooseSaveLocationDialog(
|
||||
BitwardenTextButton(
|
||||
modifier = Modifier
|
||||
.padding(horizontal = 4.dp),
|
||||
label = stringResource(R.string.take_me_to_bitwarden),
|
||||
label = stringResource(R.string.save_to_bitwarden),
|
||||
labelTextColor = MaterialTheme.colorScheme.primary,
|
||||
onClick = { onTakeMeToBitwardenClick.invoke(isSaveAsDefaultChecked) },
|
||||
)
|
||||
|
||||
@@ -11,6 +11,6 @@ import com.bitwarden.authenticator.ui.platform.feature.settings.data.model.Defau
|
||||
val DefaultSaveOption.displayLabel: Text
|
||||
get() = when (this) {
|
||||
DefaultSaveOption.NONE -> R.string.none.asText()
|
||||
DefaultSaveOption.LOCAL -> R.string.save_locally.asText()
|
||||
DefaultSaveOption.LOCAL -> R.string.save_here.asText()
|
||||
DefaultSaveOption.BITWARDEN_APP -> R.string.save_to_bitwarden.asText()
|
||||
}
|
||||
|
||||
@@ -135,16 +135,12 @@
|
||||
<string name="move_to_bitwarden">Move to Bitwarden</string>
|
||||
<string name="default_save_option">Default save option</string>
|
||||
<string name="save_to_bitwarden">Save to Bitwarden</string>
|
||||
<string name="save_locally">Save locally</string>
|
||||
<string name="save_here">Save here</string>
|
||||
<string name="none">None</string>
|
||||
<string name="default_save_options_subtitle">Select where you would like to save new verification codes.</string>
|
||||
<string name="confirm">Confirm</string>
|
||||
<string name="save_here">Save here</string>
|
||||
<string name="take_me_to_bitwarden">Take me to Bitwarden</string>
|
||||
<string name="verification_code_created">Verification code created</string>
|
||||
<string name="choose_save_location_message">Save this authenticator key here, or add it to a login in your Bitwarden app.</string>
|
||||
<string name="save_option_as_default">Save option as default</string>
|
||||
<string name="account_synced_from_bitwarden_app">Account synced from Bitwarden app</string>
|
||||
<string name="add_code_to_bitwarden">Add code to Bitwarden</string>
|
||||
<string name="add_code_locally">Add code locally</string>
|
||||
</resources>
|
||||
|
||||
@@ -64,7 +64,7 @@ class ManualCodeEntryScreenTest : BaseComposeTest() {
|
||||
it.copy(buttonState = ManualCodeEntryState.ButtonState.SaveToBitwardenPrimary)
|
||||
}
|
||||
composeTestRule
|
||||
.onNodeWithText("Add code to Bitwarden")
|
||||
.onNodeWithText("Save to Bitwarden")
|
||||
.performClick()
|
||||
|
||||
// Make sure locally only save isn't showing:
|
||||
@@ -74,7 +74,7 @@ class ManualCodeEntryScreenTest : BaseComposeTest() {
|
||||
|
||||
// Make sure locally option is showing:
|
||||
composeTestRule
|
||||
.onNodeWithText("Add code locally")
|
||||
.onNodeWithText("Save here")
|
||||
.assertIsDisplayed()
|
||||
|
||||
verify { viewModel.trySendAction(ManualCodeEntryAction.SaveToBitwardenClick) }
|
||||
@@ -86,7 +86,7 @@ class ManualCodeEntryScreenTest : BaseComposeTest() {
|
||||
it.copy(buttonState = ManualCodeEntryState.ButtonState.SaveLocallyPrimary)
|
||||
}
|
||||
composeTestRule
|
||||
.onNodeWithText("Add code locally")
|
||||
.onNodeWithText("Save here")
|
||||
.performClick()
|
||||
|
||||
// Make sure locally only save isn't showing:
|
||||
@@ -96,7 +96,7 @@ class ManualCodeEntryScreenTest : BaseComposeTest() {
|
||||
|
||||
// Make sure save to bitwarden option is showing:
|
||||
composeTestRule
|
||||
.onNodeWithText("Add code to Bitwarden")
|
||||
.onNodeWithText("Save to Bitwarden")
|
||||
.assertIsDisplayed()
|
||||
|
||||
verify { viewModel.trySendAction(ManualCodeEntryAction.SaveLocallyClick) }
|
||||
|
||||
@@ -88,7 +88,7 @@ class QrCodeScanScreenTest : BaseComposeTest() {
|
||||
)
|
||||
}
|
||||
composeTestRule
|
||||
.onNodeWithText("Take me to Bitwarden")
|
||||
.onNodeWithText("Save to Bitwarden")
|
||||
.assertIsDisplayed()
|
||||
.assert(hasAnyAncestor(isDialog()))
|
||||
.performClick()
|
||||
@@ -99,7 +99,7 @@ class QrCodeScanScreenTest : BaseComposeTest() {
|
||||
.onNodeWithText("Save option as default")
|
||||
.performClick()
|
||||
composeTestRule
|
||||
.onNodeWithText("Take me to Bitwarden")
|
||||
.onNodeWithText("Save to Bitwarden")
|
||||
.assertIsDisplayed()
|
||||
.assert(hasAnyAncestor(isDialog()))
|
||||
.performClick()
|
||||
|
||||
@@ -13,7 +13,7 @@ class DefaultSaveOptionExtensionsTest {
|
||||
DefaultSaveOption.entries.forEach {
|
||||
val expected = when (it) {
|
||||
DefaultSaveOption.BITWARDEN_APP -> R.string.save_to_bitwarden.asText()
|
||||
DefaultSaveOption.LOCAL -> R.string.save_locally.asText()
|
||||
DefaultSaveOption.LOCAL -> R.string.save_here.asText()
|
||||
DefaultSaveOption.NONE -> R.string.none.asText()
|
||||
}
|
||||
assertEquals(
|
||||
|
||||
Reference in New Issue
Block a user