BIT-1181: Adding element ids for username generator screen (#667)

This commit is contained in:
Joshua Queen 2024-01-18 13:58:45 -05:00 committed by Álison Fernandes
parent 94108bcb5d
commit 1b4b6cc627

View file

@ -879,7 +879,7 @@ private fun UsernameOptionsItem(
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.fillMaxWidth() .fillMaxWidth()
.semantics { testTag = "PasswordTypePicker" }, .semantics { testTag = "UsernameTypePicker" },
supportingText = currentSubState.selectedType.supportingStringResId?.let { supportingText = currentSubState.selectedType.supportingStringResId?.let {
stringResource(id = it) stringResource(id = it)
}, },
@ -918,8 +918,10 @@ private fun ColumnScope.ForwardedEmailAliasTypeContent(
label = stringResource(id = R.string.api_access_token), label = stringResource(id = R.string.api_access_token),
value = usernameTypeState.selectedServiceType.apiAccessToken, value = usernameTypeState.selectedServiceType.apiAccessToken,
onValueChange = forwardedEmailAliasHandlers.onAddyIoAccessTokenTextChange, onValueChange = forwardedEmailAliasHandlers.onAddyIoAccessTokenTextChange,
showPasswordTestTag = "ShowForwardedEmailApiSecretButton",
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.semantics { testTag = "ForwardedEmailApiSecretEntry" }
.fillMaxWidth(), .fillMaxWidth(),
) )
@ -931,6 +933,7 @@ private fun ColumnScope.ForwardedEmailAliasTypeContent(
onValueChange = forwardedEmailAliasHandlers.onAddyIoDomainNameTextChange, onValueChange = forwardedEmailAliasHandlers.onAddyIoDomainNameTextChange,
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.semantics { testTag = "AnonAddyDomainNameEntry" }
.fillMaxWidth(), .fillMaxWidth(),
) )
} }
@ -940,8 +943,10 @@ private fun ColumnScope.ForwardedEmailAliasTypeContent(
label = stringResource(id = R.string.api_key_required_parenthesis), label = stringResource(id = R.string.api_key_required_parenthesis),
value = usernameTypeState.selectedServiceType.apiKey, value = usernameTypeState.selectedServiceType.apiKey,
onValueChange = forwardedEmailAliasHandlers.onDuckDuckGoApiKeyTextChange, onValueChange = forwardedEmailAliasHandlers.onDuckDuckGoApiKeyTextChange,
showPasswordTestTag = "ShowForwardedEmailApiSecretButton",
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.semantics { testTag = "ForwardedEmailApiSecretEntry" }
.fillMaxWidth(), .fillMaxWidth(),
) )
} }
@ -951,8 +956,10 @@ private fun ColumnScope.ForwardedEmailAliasTypeContent(
label = stringResource(id = R.string.api_key_required_parenthesis), label = stringResource(id = R.string.api_key_required_parenthesis),
value = usernameTypeState.selectedServiceType.apiKey, value = usernameTypeState.selectedServiceType.apiKey,
onValueChange = forwardedEmailAliasHandlers.onFastMailApiKeyTextChange, onValueChange = forwardedEmailAliasHandlers.onFastMailApiKeyTextChange,
showPasswordTestTag = "ShowForwardedEmailApiSecretButton",
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.semantics { testTag = "ForwardedEmailApiSecretEntry" }
.fillMaxWidth(), .fillMaxWidth(),
) )
} }
@ -962,8 +969,10 @@ private fun ColumnScope.ForwardedEmailAliasTypeContent(
label = stringResource(id = R.string.api_access_token), label = stringResource(id = R.string.api_access_token),
value = usernameTypeState.selectedServiceType.apiAccessToken, value = usernameTypeState.selectedServiceType.apiAccessToken,
onValueChange = forwardedEmailAliasHandlers.onFirefoxRelayAccessTokenTextChange, onValueChange = forwardedEmailAliasHandlers.onFirefoxRelayAccessTokenTextChange,
showPasswordTestTag = "ShowForwardedEmailApiSecretButton",
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.semantics { testTag = "ForwardedEmailApiSecretEntry" }
.fillMaxWidth(), .fillMaxWidth(),
) )
} }
@ -973,8 +982,10 @@ private fun ColumnScope.ForwardedEmailAliasTypeContent(
label = stringResource(id = R.string.api_key_required_parenthesis), label = stringResource(id = R.string.api_key_required_parenthesis),
value = usernameTypeState.selectedServiceType.apiKey, value = usernameTypeState.selectedServiceType.apiKey,
onValueChange = forwardedEmailAliasHandlers.onSimpleLoginApiKeyTextChange, onValueChange = forwardedEmailAliasHandlers.onSimpleLoginApiKeyTextChange,
showPasswordTestTag = "ShowForwardedEmailApiSecretButton",
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.semantics { testTag = "ForwardedEmailApiSecretEntry" }
.fillMaxWidth(), .fillMaxWidth(),
) )
} }
@ -985,8 +996,10 @@ private fun ColumnScope.ForwardedEmailAliasTypeContent(
label = "", label = "",
value = obfuscatedTextField, value = obfuscatedTextField,
onValueChange = { obfuscatedTextField = it }, onValueChange = { obfuscatedTextField = it },
showPasswordTestTag = "ShowForwardedEmailApiSecretButton",
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.semantics { testTag = "ForwardedEmailApiSecretEntry" }
.fillMaxWidth(), .fillMaxWidth(),
) )
} }
@ -1014,6 +1027,7 @@ private fun ServiceTypeOptionsItem(
}, },
modifier = Modifier modifier = Modifier
.padding(horizontal = 16.dp) .padding(horizontal = 16.dp)
.semantics { testTag = "ServiceTypePicker" }
.fillMaxWidth(), .fillMaxWidth(),
) )
} }
@ -1046,6 +1060,7 @@ private fun PlusAddressedEmailTextInputItem(
}, },
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.semantics { testTag = "PlusAddressedEmailEntry" }
.padding(horizontal = 16.dp), .padding(horizontal = 16.dp),
) )
} }
@ -1080,6 +1095,7 @@ private fun CatchAllEmailTextInputItem(
}, },
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.semantics { testTag = "CatchAllEmailDomainEntry" }
.padding(horizontal = 16.dp), .padding(horizontal = 16.dp),
) )
} }
@ -1117,6 +1133,7 @@ private fun RandomWordCapitalizeToggleItem(
onCheckedChange = onRandomWordCapitalizeToggleChange, onCheckedChange = onRandomWordCapitalizeToggleChange,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.semantics { testTag = "CapitalizeRandomWordUsernameToggle" }
.padding(horizontal = 16.dp), .padding(horizontal = 16.dp),
) )
} }
@ -1132,6 +1149,7 @@ private fun RandomWordIncludeNumberToggleItem(
onCheckedChange = onRandomWordIncludeNumberToggleChange, onCheckedChange = onRandomWordIncludeNumberToggleChange,
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.semantics { testTag = "IncludeNumberRandomWordUsernameToggle" }
.padding(horizontal = 16.dp), .padding(horizontal = 16.dp),
) )
} }