PM-14179: Update internal placement of test tags for the BitwardenTextField (#4612)

This commit is contained in:
David Perez
2025-01-23 16:10:18 -06:00
committed by GitHub
parent 873f416fec
commit 50ae0902f0

View File

@@ -224,7 +224,6 @@ fun BitwardenTextField(
Box(modifier = modifier.defaultMinSize(minHeight = 60.dp)) {
Column(
modifier = Modifier
.testTag(textFieldTestTag.orEmpty())
.onGloballyPositioned { widthPx = it.size.width }
.onFocusEvent { focusState -> hasFocused = focusState.hasFocus }
.focusRequester(focusRequester)
@@ -269,7 +268,9 @@ fun BitwardenTextField(
keyboardOptions = KeyboardOptions.Default.copy(keyboardType = keyboardType),
isError = isError,
visualTransformation = visualTransformation,
modifier = Modifier.fillMaxWidth(),
modifier = Modifier
.run { textFieldTestTag?.let { testTag(tag = it) } ?: this }
.fillMaxWidth(),
)
supportingTextContent?.let {
Spacer(modifier = Modifier.height(height = 8.dp))