mirror of
https://github.com/bitwarden/android.git
synced 2025-03-16 03:08:50 +03:00
BIT-2267: Fix incorrect element IDs on add / edit page (#1332)
This commit is contained in:
parent
9763db4508
commit
3fb66fdb7e
4 changed files with 11 additions and 5 deletions
|
@ -28,13 +28,19 @@ import com.x8bit.bitwarden.ui.platform.theme.BitwardenTheme
|
|||
* @param value Current text in the text field.
|
||||
* @param onValueChange Callback that is triggered when the text content changes.
|
||||
* @param modifier [Modifier] applied to this layout composable.
|
||||
* @param textStyle The [TextStyle], or null if default.
|
||||
* @param shouldAddCustomLineBreaks If `true`, line breaks will be inserted to allow for filling
|
||||
* an entire line before breaking. `false` by default.
|
||||
* @param visualTransformation Transforms the visual representation of the input [value].
|
||||
* @param readOnly `true` if the input should be read-only and not accept user interactions.
|
||||
* @param singleLine when `true`, this text field becomes a single line that horizontally scrolls
|
||||
* instead of wrapping onto multiple lines.
|
||||
* @param keyboardType the preferred type of keyboard input.
|
||||
* @param trailingIconContent the content for the trailing icon in the text field.
|
||||
* @param actions A lambda containing the set of actions (usually icons or similar) to display
|
||||
* next to the text field. This lambda extends [RowScope],
|
||||
* providing flexibility in the layout definition.
|
||||
* @param actionsTestTag The test tag to use for the row of actions, or null if there is none.
|
||||
* @param textFieldTestTag The test tag to be used on the text field.
|
||||
*/
|
||||
@Composable
|
||||
|
|
|
@ -109,8 +109,7 @@ fun LazyListScope.vaultAddEditLoginItems(
|
|||
BitwardenTextFieldWithActions(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp)
|
||||
.testTag("LoginTotpEntry"),
|
||||
.padding(horizontal = 16.dp),
|
||||
label = stringResource(id = R.string.totp),
|
||||
value = loginState.totp,
|
||||
trailingIconContent = {
|
||||
|
@ -144,6 +143,7 @@ fun LazyListScope.vaultAddEditLoginItems(
|
|||
onClick = onTotpSetupClick,
|
||||
)
|
||||
},
|
||||
textFieldTestTag = "LoginTotpEntry",
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
@ -398,8 +398,8 @@ private fun UsernameRow(
|
|||
)
|
||||
},
|
||||
modifier = Modifier
|
||||
.testTag("LoginUsernameEntry")
|
||||
.padding(horizontal = 16.dp),
|
||||
textFieldTestTag = "LoginUsernameEntry",
|
||||
)
|
||||
|
||||
if (shouldShowDialog) {
|
||||
|
|
|
@ -51,8 +51,8 @@ fun VaultAddEditUriItem(
|
|||
)
|
||||
},
|
||||
modifier = Modifier
|
||||
.testTag("LoginUriEntry")
|
||||
.padding(horizontal = 16.dp),
|
||||
textFieldTestTag = "LoginUriEntry",
|
||||
)
|
||||
|
||||
if (shouldShowOptionsDialog) {
|
||||
|
|
|
@ -120,7 +120,6 @@ fun VaultItemLoginContent(
|
|||
isPremiumUser = loginItemState.isPremiumUser,
|
||||
onCopyTotpClick = vaultLoginItemTypeHandlers.onCopyTotpCodeClick,
|
||||
modifier = Modifier
|
||||
.testTag("LoginTotpEntry")
|
||||
.fillMaxWidth()
|
||||
.padding(horizontal = 16.dp),
|
||||
)
|
||||
|
@ -396,6 +395,7 @@ private fun TotpField(
|
|||
)
|
||||
},
|
||||
modifier = modifier,
|
||||
textFieldTestTag = "LoginTotpEntry",
|
||||
)
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Reference in a new issue