Add TestTag to the Recovery key field.

This commit is contained in:
Benoit Marty 2024-02-22 10:25:47 +01:00
parent c85b716098
commit 64db9fa173
4 changed files with 11 additions and 1 deletions

View file

@ -3,7 +3,8 @@ appId: ${MAESTRO_APP_ID}
- tapOn: "Continue" - tapOn: "Continue"
- takeScreenshot: build/maestro/150-Verify - takeScreenshot: build/maestro/150-Verify
- tapOn: "Enter recovery key" - tapOn: "Enter recovery key"
- tapOn: "Enter…" - tapOn:
id: "verification-recovery_key"
- inputText: ${MAESTRO_RECOVERY_KEY} - inputText: ${MAESTRO_RECOVERY_KEY}
- hideKeyboard - hideKeyboard
- tapOn: "Confirm" - tapOn: "Confirm"

View file

@ -42,6 +42,7 @@ dependencies {
implementation(projects.libraries.matrixui) implementation(projects.libraries.matrixui)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.uiStrings) implementation(projects.libraries.uiStrings)
implementation(projects.libraries.testtags)
api(libs.statemachine) api(libs.statemachine)
api(projects.features.securebackup.api) api(projects.features.securebackup.api)

View file

@ -53,6 +53,8 @@ import io.element.android.libraries.designsystem.theme.components.Icon
import io.element.android.libraries.designsystem.theme.components.OutlinedTextField import io.element.android.libraries.designsystem.theme.components.OutlinedTextField
import io.element.android.libraries.designsystem.theme.components.Text import io.element.android.libraries.designsystem.theme.components.Text
import io.element.android.libraries.designsystem.theme.components.autofill import io.element.android.libraries.designsystem.theme.components.autofill
import io.element.android.libraries.testtags.TestTags
import io.element.android.libraries.testtags.testTag
import io.element.android.libraries.ui.strings.CommonStrings import io.element.android.libraries.ui.strings.CommonStrings
@Composable @Composable
@ -169,6 +171,7 @@ private fun RecoveryKeyFormContent(
OutlinedTextField( OutlinedTextField(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.testTag(TestTags.recoveryKey)
.autofill( .autofill(
autofillTypes = listOf(AutofillType.Password), autofillTypes = listOf(AutofillType.Password),
onFill = { onChange(it) }, onFill = { onChange(it) },

View file

@ -33,6 +33,11 @@ object TestTags {
val loginPassword = TestTag("login-password") val loginPassword = TestTag("login-password")
val loginContinue = TestTag("login-continue") val loginContinue = TestTag("login-continue")
/**
* Verification screen.
*/
val recoveryKey = TestTag("verification-recovery_key")
/** /**
* Sign out screen. * Sign out screen.
*/ */