mirror of
https://github.com/bitwarden/android.git
synced 2026-10-19 01:30:21 -05:00
QA-1702: Adding missing testTags for TestHarness app (#6763)
This commit is contained in:
1 parent
61955d7cbe
commit
54e74e98b4
7 files changed
+82
-31
No files matched your search
+19
-6
@@ -18,6 +18,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -107,7 +108,9 @@ private fun CreatePasskeyScreenContent(
|
||||
value = state.username,
|
||||
onValueChange = onUsernameChange,
|
||||
cardStyle = null,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.testTag("PasskeyUsernameField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -118,7 +121,9 @@ private fun CreatePasskeyScreenContent(
|
||||
onValueChange = onRpIdChange,
|
||||
placeholder = stringResource(R.string.rp_id_hint),
|
||||
cardStyle = null,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.testTag("PasskeyRelyingPartyIdField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -129,7 +134,9 @@ private fun CreatePasskeyScreenContent(
|
||||
onValueChange = onOriginChange,
|
||||
placeholder = stringResource(R.string.origin_hint),
|
||||
cardStyle = null,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.testTag("PasskeyOriginField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -138,7 +145,9 @@ private fun CreatePasskeyScreenContent(
|
||||
label = stringResource(R.string.execute),
|
||||
onClick = onExecuteClick,
|
||||
isEnabled = !state.isLoading,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.testTag("PasskeyExecuteButton"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
@@ -147,7 +156,9 @@ private fun CreatePasskeyScreenContent(
|
||||
label = stringResource(BitwardenString.clear),
|
||||
onClick = onClearResultClick,
|
||||
isEnabled = !state.isLoading,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.testTag("PasskeyClearButton"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -159,7 +170,9 @@ private fun CreatePasskeyScreenContent(
|
||||
cardStyle = null,
|
||||
readOnly = true,
|
||||
singleLine = false,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.testTag("PasskeyResultTextField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
+11
-5
@@ -16,6 +16,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
@@ -86,7 +87,8 @@ fun CreatePasswordScreen(
|
||||
cardStyle = null,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("PasswordUsernameField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -100,7 +102,8 @@ fun CreatePasswordScreen(
|
||||
cardStyle = null,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("PasswordField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -111,7 +114,8 @@ fun CreatePasswordScreen(
|
||||
isEnabled = !state.isLoading,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("PasswordExecuteButton"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
@@ -122,7 +126,8 @@ fun CreatePasswordScreen(
|
||||
isEnabled = !state.isLoading,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("PasswordClearButton"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -136,7 +141,8 @@ fun CreatePasswordScreen(
|
||||
singleLine = false,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("PasswordResultTextField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
+16
-5
@@ -13,6 +13,7 @@ import androidx.compose.material3.TopAppBarDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
@@ -109,7 +110,9 @@ fun CredentialManagerListScreen(
|
||||
text = stringResource(id = R.string.get_password),
|
||||
onClick = { viewModel.trySendAction(CredentialManagerListAction.GetPasswordClick) },
|
||||
cardStyle = CardStyle.Top(),
|
||||
modifier = Modifier.standardHorizontalMargin(),
|
||||
modifier = Modifier
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasswordRow"),
|
||||
)
|
||||
|
||||
BitwardenPushRow(
|
||||
@@ -118,14 +121,18 @@ fun CredentialManagerListScreen(
|
||||
viewModel.trySendAction(CredentialManagerListAction.CreatePasswordClick)
|
||||
},
|
||||
cardStyle = CardStyle.Middle(),
|
||||
modifier = Modifier.standardHorizontalMargin(),
|
||||
modifier = Modifier
|
||||
.standardHorizontalMargin()
|
||||
.testTag("CreatePasswordRow"),
|
||||
)
|
||||
|
||||
BitwardenPushRow(
|
||||
text = stringResource(id = R.string.get_passkey),
|
||||
onClick = { viewModel.trySendAction(CredentialManagerListAction.GetPasskeyClick) },
|
||||
cardStyle = CardStyle.Middle(),
|
||||
modifier = Modifier.standardHorizontalMargin(),
|
||||
modifier = Modifier
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasskeyRow"),
|
||||
)
|
||||
|
||||
BitwardenPushRow(
|
||||
@@ -134,7 +141,9 @@ fun CredentialManagerListScreen(
|
||||
viewModel.trySendAction(CredentialManagerListAction.CreatePasskeyClick)
|
||||
},
|
||||
cardStyle = CardStyle.Middle(),
|
||||
modifier = Modifier.standardHorizontalMargin(),
|
||||
modifier = Modifier
|
||||
.standardHorizontalMargin()
|
||||
.testTag("CreatePasskeyRow"),
|
||||
)
|
||||
|
||||
BitwardenPushRow(
|
||||
@@ -143,7 +152,9 @@ fun CredentialManagerListScreen(
|
||||
viewModel.trySendAction(CredentialManagerListAction.GetPasswordOrPasskeyClick)
|
||||
},
|
||||
cardStyle = CardStyle.Bottom,
|
||||
modifier = Modifier.standardHorizontalMargin(),
|
||||
modifier = Modifier
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasswordOrPasskeyRow"),
|
||||
)
|
||||
|
||||
Spacer(Modifier.height(16.dp))
|
||||
|
||||
+11
-5
@@ -16,6 +16,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
@@ -83,7 +84,8 @@ fun GetPasskeyScreen(
|
||||
cardStyle = null,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("PasskeyRelyingPartyIdField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -96,7 +98,8 @@ fun GetPasskeyScreen(
|
||||
cardStyle = null,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("PasskeyOriginField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -107,7 +110,8 @@ fun GetPasskeyScreen(
|
||||
isEnabled = !state.isLoading,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasskeyExecuteButton"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
@@ -118,7 +122,8 @@ fun GetPasskeyScreen(
|
||||
isEnabled = !state.isLoading,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasskeyClearButton"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -132,7 +137,8 @@ fun GetPasskeyScreen(
|
||||
singleLine = false,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasskeyResultTextField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
+7
-3
@@ -17,6 +17,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
@@ -96,7 +97,8 @@ fun GetPasswordScreen(
|
||||
isEnabled = !state.isLoading,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPaswordExecuteButton"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
@@ -107,7 +109,8 @@ fun GetPasswordScreen(
|
||||
isEnabled = !state.isLoading,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasswordClearButton"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -121,7 +124,8 @@ fun GetPasswordScreen(
|
||||
singleLine = false,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasswordResultTextField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
+11
-5
@@ -16,6 +16,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.hilt.lifecycle.viewmodel.compose.hiltViewModel
|
||||
@@ -92,7 +93,8 @@ fun GetPasswordOrPasskeyScreen(
|
||||
cardStyle = null,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasswordOrPasskeyRelyingPartyIdField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -107,7 +109,8 @@ fun GetPasswordOrPasskeyScreen(
|
||||
cardStyle = null,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasswordOrPasskeyOriginField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -118,7 +121,8 @@ fun GetPasswordOrPasskeyScreen(
|
||||
isEnabled = !state.isLoading,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasswordOrPasskeyExecuteButton"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(12.dp))
|
||||
@@ -129,7 +133,8 @@ fun GetPasswordOrPasskeyScreen(
|
||||
isEnabled = !state.isLoading,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasswordOrPasskeyClearButton"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
@@ -143,7 +148,8 @@ fun GetPasswordOrPasskeyScreen(
|
||||
singleLine = false,
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.standardHorizontalMargin(),
|
||||
.standardHorizontalMargin()
|
||||
.testTag("GetPasswordOrPasskeyResultField"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
+7
-2
@@ -15,6 +15,7 @@ import androidx.compose.material3.rememberTopAppBarState
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.testTag
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -96,14 +97,18 @@ private fun LandingScreenContent(
|
||||
text = stringResource(id = R.string.autofill),
|
||||
onClick = onAutofillClick,
|
||||
cardStyle = CardStyle.Top(),
|
||||
modifier = Modifier.standardHorizontalMargin(),
|
||||
modifier = Modifier
|
||||
.standardHorizontalMargin()
|
||||
.testTag("AutofillCategory"),
|
||||
)
|
||||
|
||||
BitwardenPushRow(
|
||||
text = stringResource(id = R.string.credential_manager),
|
||||
onClick = onCredentialManagerClick,
|
||||
cardStyle = CardStyle.Bottom,
|
||||
modifier = Modifier.standardHorizontalMargin(),
|
||||
modifier = Modifier
|
||||
.standardHorizontalMargin()
|
||||
.testTag("CredentialManagerCategory"),
|
||||
)
|
||||
|
||||
Spacer(modifier = Modifier.height(16.dp))
|
||||
|
||||
Reference in new issue
Block a user