mirror of
https://github.com/bitwarden/android.git
synced 2024-10-31 15:15:34 +03:00
Adding testTags for radiobutton and floating options elements
This commit is contained in:
parent
7ea7d78e66
commit
d0b6b5f501
3 changed files with 7 additions and 6 deletions
|
@ -65,6 +65,7 @@ fun BitwardenOverflowActionItem(
|
||||||
containerColor = BitwardenTheme.colorScheme.background.primary,
|
containerColor = BitwardenTheme.colorScheme.background.primary,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.semantics { testTagsAsResourceId = true }
|
.semantics { testTagsAsResourceId = true }
|
||||||
|
.testTag("FloatingOptionsContent")
|
||||||
.widthIn(
|
.widthIn(
|
||||||
min = 112.dp,
|
min = 112.dp,
|
||||||
max = 280.dp,
|
max = 280.dp,
|
||||||
|
@ -72,16 +73,13 @@ fun BitwardenOverflowActionItem(
|
||||||
content = {
|
content = {
|
||||||
menuItemDataList.forEach { dropdownMenuItemData ->
|
menuItemDataList.forEach { dropdownMenuItemData ->
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
modifier = Modifier.semantics {
|
modifier = Modifier.testTag("FloatingOptionsItem"),
|
||||||
dropdownMenuItemData.testTag?.let {
|
|
||||||
testTag = it
|
|
||||||
}
|
|
||||||
},
|
|
||||||
colors = bitwardenMenuItemColors(),
|
colors = bitwardenMenuItemColors(),
|
||||||
text = {
|
text = {
|
||||||
Text(
|
Text(
|
||||||
text = dropdownMenuItemData.text,
|
text = dropdownMenuItemData.text,
|
||||||
style = BitwardenTheme.typography.bodyLarge,
|
style = BitwardenTheme.typography.bodyLarge,
|
||||||
|
modifier = Modifier.testTag("FloatingOptionsItemName")
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
onClick = {
|
onClick = {
|
||||||
|
|
|
@ -11,6 +11,7 @@ import androidx.compose.runtime.Composable
|
||||||
import androidx.compose.runtime.remember
|
import androidx.compose.runtime.remember
|
||||||
import androidx.compose.ui.Alignment
|
import androidx.compose.ui.Alignment
|
||||||
import androidx.compose.ui.Modifier
|
import androidx.compose.ui.Modifier
|
||||||
|
import androidx.compose.ui.platform.testTag
|
||||||
import androidx.compose.ui.semantics.selected
|
import androidx.compose.ui.semantics.selected
|
||||||
import androidx.compose.ui.semantics.semantics
|
import androidx.compose.ui.semantics.semantics
|
||||||
import androidx.compose.ui.unit.dp
|
import androidx.compose.ui.unit.dp
|
||||||
|
@ -35,6 +36,7 @@ fun BitwardenSelectionRow(
|
||||||
Row(
|
Row(
|
||||||
modifier = modifier
|
modifier = modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
|
.testTag("AlertSelectionOption")
|
||||||
.clickable(
|
.clickable(
|
||||||
interactionSource = remember { MutableInteractionSource() },
|
interactionSource = remember { MutableInteractionSource() },
|
||||||
indication = ripple(
|
indication = ripple(
|
||||||
|
@ -56,6 +58,7 @@ fun BitwardenSelectionRow(
|
||||||
text = text(),
|
text = text(),
|
||||||
color = BitwardenTheme.colorScheme.text.primary,
|
color = BitwardenTheme.colorScheme.text.primary,
|
||||||
style = BitwardenTheme.typography.bodyLarge,
|
style = BitwardenTheme.typography.bodyLarge,
|
||||||
|
modifier = Modifier.testTag("AlertSelectionOptionName")
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ fun VaultContent(
|
||||||
showDivider = true,
|
showDivider = true,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.testTag("FolderFilter")
|
.testTag("VerificationCodesFilter")
|
||||||
.padding(16.dp),
|
.padding(16.dp),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue