Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fun FoldersScreen(
.nestedScroll(scrollBehavior.nestedScrollConnection),
topBar = {
BitwardenTopAppBar(
title = stringResource(id = BitwardenString.folders),
title = stringResource(id = BitwardenString.my_folders),
scrollBehavior = scrollBehavior,
navigationIcon = rememberVectorPainter(id = BitwardenDrawable.ic_close),
navigationIconContentDescription = stringResource(id = BitwardenString.close),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ fun VaultSettingsScreen(
)
}
BitwardenTextRow(
text = stringResource(BitwardenString.folders),
text = stringResource(BitwardenString.my_folders),
onClick = { viewModel.trySendAction(VaultSettingsAction.FoldersButtonClick) },
withDivider = false,
cardStyle = CardStyle.Top(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ fun CoachMarkScope<AddEditItemCoachMark>.VaultAddEditContent(
item {
Spacer(modifier = Modifier.height(height = 8.dp))
BitwardenTextSelectionButton(
label = stringResource(id = BitwardenString.folder),
label = stringResource(id = BitwardenString.my_folder),
selectedOption = state.common.selectedFolder?.name,
onClick = commonTypeHandlers.onSelectOrAddFolderForItem,
cardStyle = if (isAddItemMode && state.common.hasOrganizations) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ fun VaultAddEditScreen(
.takeUnless { state.isAddItemMode },
OverflowMenuItemData(
text = stringResource(
id = BitwardenString.move_to_vault,
id = BitwardenString.move,
),
onClick = {
viewModel.trySendAction(
Expand Down Expand Up @@ -658,7 +658,7 @@ private fun FolderSelectionBottomSheet(
mutableStateOf(state.selectedFolder?.name.orEmpty())
}
BitwardenModalBottomSheet(
sheetTitle = stringResource(BitwardenString.folders),
sheetTitle = stringResource(BitwardenString.my_folders),
onDismiss = handlers.onDismissBottomSheet,
topBarActions = { animatedOnDismiss ->
BitwardenTextButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ fun VaultItemScreen(
)
.takeUnless { state.isCipherInCollection },
OverflowMenuItemData(
text = stringResource(id = BitwardenString.move_to_vault),
text = stringResource(id = BitwardenString.move),
onClick = {
viewModel.trySendAction(
VaultItemAction.Common.MoveToOrganizationClick,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ fun VaultItemListingContent(
item(key = "folders_header") {
Spacer(modifier = Modifier.height(height = 12.dp))
BitwardenListHeaderText(
label = stringResource(id = BitwardenString.folders),
label = stringResource(id = BitwardenString.my_folders),
supportingLabel = state.displayFolderList.count().toString(),
modifier = Modifier
.animateItem()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ fun VaultMoveToOrganizationContent(
item {
BitwardenMultiSelectButton(
label = stringResource(id = BitwardenString.vault),
dialogTitle = stringResource(id = BitwardenString.filter_by_vault),
options = state
.organizations
.map { it.name }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ data class VaultMoveToOrganizationState(
get() = if (onlyShowCollections) {
BitwardenString.shared_folders.asText()
} else {
BitwardenString.move_to_vault.asText()
BitwardenString.move.asText()
}

val appBarButtonText: Text
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ fun VaultContent(
if (state.folderItems.isNotEmpty()) {
item(key = "folders_header") {
BitwardenListHeaderText(
label = stringResource(id = BitwardenString.folders),
label = stringResource(id = BitwardenString.my_folders),
supportingLabel = state.folderItems.count().toString(),
modifier = Modifier
.animateItem()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3560,7 +3560,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {

// Opens the menu
composeTestRule
.onNodeWithContentDescriptionAfterScroll(label = "No Folder. Folder")
.onNodeWithContentDescriptionAfterScroll(label = "No Folder. My folder")
.performClick()

verify {
Expand All @@ -3575,15 +3575,15 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {
updateStateWithFolders()

composeTestRule
.onNodeWithContentDescriptionAfterScroll(label = "No Folder. Folder")
.onNodeWithContentDescriptionAfterScroll(label = "No Folder. My folder")
.assertIsDisplayed()

mutableStateFlow.update { currentState ->
updateCommonContent(currentState) { copy(selectedFolderId = "mockFolderId-1") }
}

composeTestRule
.onNodeWithContentDescriptionAfterScroll(label = "mockFolderName-1. Folder")
.onNodeWithContentDescriptionAfterScroll(label = "mockFolderName-1. My folder")
.assertIsDisplayed()
}

Expand All @@ -3594,7 +3594,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {
}

composeTestRule
.onNodeWithText("Folders")
.onNodeWithText("My folders")
.assertIsDisplayed()

composeTestRule
Expand All @@ -3609,7 +3609,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {
}

composeTestRule
.onNodeWithText("Folders")
.onNodeWithText("My folders")
.assertIsDisplayed()

composeTestRule
Expand All @@ -3633,7 +3633,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {
}

composeTestRule
.onNodeWithText("Folders")
.onNodeWithText("My folders")
.assertIsDisplayed()

composeTestRule
Expand All @@ -3656,7 +3656,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {
val newFolderName = "newFolderName"

composeTestRule
.onNodeWithText("Folders")
.onNodeWithText("My folders")
.assertIsDisplayed()

composeTestRule
Expand Down Expand Up @@ -4422,7 +4422,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {
.assertIsDisplayed()

composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filterToOne(hasAnyAncestor(isPopup()))
.assertDoesNotExist()

Expand Down Expand Up @@ -4510,7 +4510,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {
.assertIsDisplayed()

composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filterToOne(hasAnyAncestor(isPopup()))
.assertIsDisplayed()

Expand Down Expand Up @@ -5181,7 +5181,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {

// Confirm dropdown version of item is absent
composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filter(hasAnyAncestor(isPopup()))
.assertCountEquals(0)
// Open the overflow menu
Expand All @@ -5191,7 +5191,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {

// Confirm it does not exist
composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filterToOne(hasAnyAncestor(isPopup()))
.assertIsNotDisplayed()
}
Expand All @@ -5216,7 +5216,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {

// Confirm dropdown version of item is absent
composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filter(hasAnyAncestor(isPopup()))
.assertCountEquals(0)

Expand All @@ -5225,7 +5225,7 @@ class VaultAddEditScreenTest : BitwardenComposeTest() {
.performClick()

composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filterToOne(hasAnyAncestor(isPopup()))
.assertIsDisplayed()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1547,14 +1547,14 @@ class VaultItemScreenTest : BitwardenComposeTest() {

// Confirm dropdown version of item is absent
composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filter(hasAnyAncestor(isPopup()))
.assertCountEquals(0)
// Open the overflow menu
composeTestRule.onNodeWithContentDescription("More options").performClick()
// Click on the move to organization hint item in the dropdown
composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filterToOne(hasAnyAncestor(isPopup()))
.performClick()
verify {
Expand All @@ -1574,14 +1574,14 @@ class VaultItemScreenTest : BitwardenComposeTest() {

// Confirm dropdown version of item is absent
composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filter(hasAnyAncestor(isPopup()))
.assertCountEquals(0)
// Open the overflow menu
composeTestRule.onNodeWithContentDescription("More options").performClick()
// Confirm it does not exist
composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filterToOne(hasAnyAncestor(isPopup()))
.assertDoesNotExist()
}
Expand Down Expand Up @@ -1696,7 +1696,7 @@ class VaultItemScreenTest : BitwardenComposeTest() {
.assertIsDisplayed()

composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filterToOne(hasAnyAncestor(isPopup()))
.assertDoesNotExist()

Expand Down Expand Up @@ -1724,7 +1724,7 @@ class VaultItemScreenTest : BitwardenComposeTest() {
.assertIsDisplayed()

composeTestRule
.onAllNodesWithText("Move to vault")
.onAllNodesWithText("Move")
.filterToOne(hasAnyAncestor(isPopup()))
.assertIsDisplayed()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,7 @@ class VaultItemListingScreenTest : BitwardenComposeTest() {

@Test
fun `Folders text should be displayed according to state`() {
val folders = "FOLDERS (1)"
val folders = "MY FOLDERS (1)"
mutableStateFlow.update { DEFAULT_STATE }
composeTestRule
.onNodeWithText(text = folders)
Expand Down Expand Up @@ -822,7 +822,7 @@ class VaultItemListingScreenTest : BitwardenComposeTest() {
fun `Folders text count should be displayed according to state`() {
mutableStateFlow.update { DEFAULT_STATE }
composeTestRule
.onNodeWithText(text = "FOLDERS (1)")
.onNodeWithText(text = "MY FOLDERS (1)")
.assertDoesNotExist()

mutableStateFlow.update {
Expand All @@ -837,7 +837,7 @@ class VaultItemListingScreenTest : BitwardenComposeTest() {
)
}
composeTestRule
.onNodeWithTextAfterScroll(text = "FOLDERS (1)")
.onNodeWithTextAfterScroll(text = "MY FOLDERS (1)")
.assertIsDisplayed()

mutableStateFlow.update {
Expand Down Expand Up @@ -867,7 +867,7 @@ class VaultItemListingScreenTest : BitwardenComposeTest() {
}

composeTestRule
.onNodeWithTextAfterScroll(text = "FOLDERS (3)")
.onNodeWithTextAfterScroll(text = "MY FOLDERS (3)")
.assertIsDisplayed()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import androidx.compose.ui.test.assertIsOff
import androidx.compose.ui.test.assertIsOn
import androidx.compose.ui.test.filterToOne
import androidx.compose.ui.test.hasAnyAncestor
import androidx.compose.ui.test.hasClickAction
import androidx.compose.ui.test.isDialog
import androidx.compose.ui.test.onAllNodesWithText
import androidx.compose.ui.test.onLast
Expand Down Expand Up @@ -60,15 +61,16 @@ class VaultMoveToOrganizationScreenTest : BitwardenComposeTest() {
.onNodeWithText(text = "Shared folders")
.assertIsNotDisplayed()
composeTestRule
.onNodeWithText(text = "Move to vault")
.onAllNodesWithText(text = "Move")
.filterToOne(!hasClickAction())
.assertIsDisplayed()

mutableStateFlow.update { currentState ->
currentState.copy(onlyShowCollections = true)
}

composeTestRule
.onNodeWithText(text = "Move to vault")
.onNodeWithText(text = "Move")
.assertIsNotDisplayed()
composeTestRule
.onNodeWithText(text = "Shared folders")
Expand All @@ -85,7 +87,8 @@ class VaultMoveToOrganizationScreenTest : BitwardenComposeTest() {
.onNodeWithText(text = "Save")
.assertIsNotDisplayed()
composeTestRule
.onNodeWithText(text = "Move")
.onAllNodesWithText(text = "Move")
.filterToOne(hasClickAction())
.assertIsDisplayed()

mutableStateFlow.update { currentState ->
Expand Down Expand Up @@ -155,7 +158,8 @@ class VaultMoveToOrganizationScreenTest : BitwardenComposeTest() {
@Test
fun `clicking move button should send MoveClick action`() {
composeTestRule
.onNodeWithText(text = "Move")
.onAllNodesWithText(text = "Move")
.filterToOne(hasClickAction())
.performClick()

verify {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ import kotlinx.collections.immutable.toImmutableList
* @param isEnabled Whether the button is enabled.
* @param cardStyle Indicates the type of card style to be applied.
* @param modifier A [Modifier] that you can use to apply custom modifications to the composable.
* @param dialogTitle The title to apply to the dialog (defaults to [label] when `null`).
* @param dialogSubtitle The subtitle to apply to the dialog.
* @param supportingText An optional supporting text that will appear below the text field.
* @param helpData An optional [BitwardenHelpButtonData], representing the help button.
Expand All @@ -67,6 +68,7 @@ fun BitwardenMultiSelectButton(
onOptionSelected: (String) -> Unit,
cardStyle: CardStyle?,
modifier: Modifier = Modifier,
dialogTitle: String? = null,
dialogSubtitle: String? = null,
isEnabled: Boolean = true,
supportingText: String? = null,
Expand All @@ -78,6 +80,7 @@ fun BitwardenMultiSelectButton(
) {
BitwardenMultiSelectButton(
label = label,
dialogTitle = dialogTitle,
dialogSubtitle = dialogSubtitle,
options = options.map { MultiSelectOption.Row(it) }.toImmutableList(),
selectedOption = selectedOption?.let { MultiSelectOption.Row(it) },
Expand Down Expand Up @@ -119,6 +122,7 @@ fun BitwardenMultiSelectButton(
* @param supportingContent An optional supporting content that will appear below the button.
* @param cardStyle Indicates the type of card style to be applied.
* @param modifier A [Modifier] that you can use to apply custom modifications to the composable.
* @param dialogTitle The title to apply to the dialog (defaults to [label] when `null`).
* @param helpData An optional [BitwardenHelpButtonData], representing the help button.
* @param insets Inner padding to be applied withing the card.
* @param textFieldTestTag The optional test tag associated with the inner text field.
Expand All @@ -135,6 +139,7 @@ fun BitwardenMultiSelectButton(
onOptionSelected: (MultiSelectOption.Row) -> Unit,
cardStyle: CardStyle?,
modifier: Modifier = Modifier,
dialogTitle: String? = null,
dialogSubtitle: String? = null,
isEnabled: Boolean = true,
supportingContent: @Composable (ColumnScope.() -> Unit)?,
Expand Down Expand Up @@ -166,7 +171,7 @@ fun BitwardenMultiSelectButton(

if (shouldShowDialog) {
BitwardenSelectionDialog(
title = label,
title = dialogTitle ?: label,
subTitle = dialogSubtitle,
onDismissRequest = { shouldShowDialog = false },
) {
Expand Down
Loading
Loading