BIT-1577 Add the options element ID (#980)

This commit is contained in:
Oleg Semenenko 2024-02-07 16:17:13 -06:00 committed by Álison Fernandes
parent d58e06e00f
commit 7326063f68
3 changed files with 3 additions and 1 deletions

View file

@ -40,12 +40,14 @@ import kotlinx.collections.immutable.persistentListOf
*/ */
@Composable @Composable
fun BitwardenOverflowActionItem( fun BitwardenOverflowActionItem(
modifier: Modifier = Modifier,
menuItemDataList: ImmutableList<OverflowMenuItemData> = persistentListOf(), menuItemDataList: ImmutableList<OverflowMenuItemData> = persistentListOf(),
) { ) {
if (menuItemDataList.isEmpty()) return if (menuItemDataList.isEmpty()) return
var isOverflowMenuVisible by remember { mutableStateOf(false) } var isOverflowMenuVisible by remember { mutableStateOf(false) }
Box( Box(
contentAlignment = Alignment.Center, contentAlignment = Alignment.Center,
modifier = modifier,
) { ) {
IconButton(onClick = { isOverflowMenuVisible = !isOverflowMenuVisible }) { IconButton(onClick = { isOverflowMenuVisible = !isOverflowMenuVisible }) {
Icon( Icon(

View file

@ -255,7 +255,6 @@ private fun DefaultAppBar(
OverflowMenuItemData( OverflowMenuItemData(
text = stringResource(id = R.string.password_history), text = stringResource(id = R.string.password_history),
onClick = onPasswordHistoryClick, onClick = onPasswordHistoryClick,
testTag = "Options",
), ),
), ),
) )

View file

@ -94,6 +94,7 @@ fun PasswordHistoryScreen(
}, },
), ),
), ),
modifier = Modifier.semantics { testTag = "Options" },
) )
} }
}, },