mirror of
https://github.com/bitwarden/android.git
synced 2024-11-26 11:26:09 +03:00
BIT-1971: Add remaining appbar and fab test tags (#1128)
This commit is contained in:
parent
b3e4d3807c
commit
4d945d20f2
7 changed files with 21 additions and 2 deletions
|
@ -105,6 +105,7 @@ fun BitwardenTopAppBar(
|
|||
maxLines = 1,
|
||||
softWrap = false,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
modifier = Modifier.semantics { testTag = "PageTitleLabel" },
|
||||
)
|
||||
},
|
||||
modifier = modifier.semantics { testTag = "HeaderBarComponent" },
|
||||
|
|
|
@ -36,6 +36,8 @@ import androidx.compose.ui.Modifier
|
|||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
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.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
|
@ -136,6 +138,7 @@ fun BlockAutoFillScreen(
|
|||
onClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(BlockAutoFillAction.AddUriClick) }
|
||||
},
|
||||
modifier = Modifier.semantics { testTag = "AddItemButton" },
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_plus),
|
||||
|
|
|
@ -28,6 +28,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.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
|
@ -90,7 +92,9 @@ fun FoldersScreen(
|
|||
onClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(FoldersAction.AddFolderButtonClick) }
|
||||
},
|
||||
modifier = Modifier.navigationBarsPadding(),
|
||||
modifier = Modifier
|
||||
.semantics { testTag = "AddItemButton" }
|
||||
.navigationBarsPadding(),
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_plus),
|
||||
|
|
|
@ -23,6 +23,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
|
||||
|
@ -159,6 +161,7 @@ fun SendScreen(
|
|||
onClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(SendAction.AddSendClick) }
|
||||
},
|
||||
modifier = Modifier.semantics { testTag = "AddItemButton" },
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_plus),
|
||||
|
|
|
@ -254,7 +254,9 @@ fun VaultItemScreen(
|
|||
onClick = remember(viewModel) {
|
||||
{ viewModel.trySendAction(VaultItemAction.Common.EditClick) }
|
||||
},
|
||||
modifier = Modifier.padding(bottom = 16.dp),
|
||||
modifier = Modifier
|
||||
.semantics { testTag = "EditItemButton" }
|
||||
.padding(bottom = 16.dp),
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_edit),
|
||||
|
|
|
@ -24,6 +24,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 com.x8bit.bitwarden.R
|
||||
|
@ -227,6 +229,7 @@ private fun VaultItemListingScaffold(
|
|||
FloatingActionButton(
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||
onClick = vaultItemListingHandlers.addVaultItemClick,
|
||||
modifier = Modifier.semantics { testTag = "AddItemButton" },
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_plus),
|
||||
|
|
|
@ -30,6 +30,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.compose.ui.unit.dp
|
||||
import androidx.core.net.toUri
|
||||
import androidx.hilt.navigation.compose.hiltViewModel
|
||||
|
@ -252,6 +254,7 @@ private fun VaultScreenScaffold(
|
|||
FloatingActionButton(
|
||||
containerColor = MaterialTheme.colorScheme.primaryContainer,
|
||||
onClick = vaultHandlers.addItemClickAction,
|
||||
modifier = Modifier.semantics { testTag = "AddItemButton" },
|
||||
) {
|
||||
Icon(
|
||||
painter = painterResource(id = R.drawable.ic_plus),
|
||||
|
|
Loading…
Reference in a new issue