mirror of
https://github.com/bitwarden/android.git
synced 2024-11-22 17:36:01 +03:00
BIT-1992: Add test tags to the folders UI (#1130)
This commit is contained in:
parent
c9de5b919c
commit
3f19401c6d
4 changed files with 12 additions and 0 deletions
|
@ -154,6 +154,7 @@ private fun FoldersContent(
|
|||
textAlign = TextAlign.Center,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
color = MaterialTheme.colorScheme.onSurface,
|
||||
modifier = Modifier.semantics { testTag = "NoFoldersLabel" },
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
@ -163,6 +164,7 @@ private fun FoldersContent(
|
|||
items(foldersList) {
|
||||
Row(
|
||||
modifier = Modifier
|
||||
.semantics { testTag = "FolderCell" }
|
||||
.clickable(
|
||||
interactionSource = remember { MutableInteractionSource() },
|
||||
indication = rememberRipple(color = MaterialTheme.colorScheme.primary),
|
||||
|
@ -176,6 +178,7 @@ private fun FoldersContent(
|
|||
) {
|
||||
Text(
|
||||
modifier = Modifier
|
||||
.semantics { testTag = "FolderName" }
|
||||
.padding(start = 16.dp)
|
||||
.weight(1f),
|
||||
text = it.name,
|
||||
|
|
|
@ -19,6 +19,8 @@ import androidx.compose.ui.input.nestedscroll.nestedScroll
|
|||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.semantics.testTag
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import com.x8bit.bitwarden.R
|
||||
|
@ -144,6 +146,7 @@ fun AddSendScreen(
|
|||
onClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(AddSendAction.SaveClick) }
|
||||
},
|
||||
modifier = Modifier.semantics { testTag = "SaveButton" },
|
||||
)
|
||||
if (!state.isAddMode) {
|
||||
BitwardenOverflowActionItem(
|
||||
|
|
|
@ -18,6 +18,8 @@ import androidx.compose.ui.input.nestedscroll.nestedScroll
|
|||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.semantics.testTag
|
||||
import androidx.core.net.toUri
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
|
@ -180,6 +182,7 @@ fun VaultAddEditScreen(
|
|||
onClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(VaultAddEditAction.Common.SaveClick) }
|
||||
},
|
||||
modifier = Modifier.semantics { testTag = "SaveButton" },
|
||||
)
|
||||
BitwardenOverflowActionItem(
|
||||
menuItemDataList = persistentListOfNotNull(
|
||||
|
|
|
@ -14,6 +14,8 @@ import androidx.compose.ui.input.nestedscroll.nestedScroll
|
|||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.semantics.semantics
|
||||
import androidx.compose.ui.semantics.testTag
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import com.x8bit.bitwarden.R
|
||||
|
@ -92,6 +94,7 @@ fun AttachmentsScreen(
|
|||
BitwardenTextButton(
|
||||
label = stringResource(id = R.string.save),
|
||||
onClick = attachmentsHandlers.onSaveClick,
|
||||
modifier = Modifier.semantics { testTag = "SaveButton" },
|
||||
)
|
||||
},
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue