mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-05 12:54:35 +00:00
Merge pull request #1722 from vector-im/feature/bma/fixMaestroSignOut
Fix maestro test.
This commit is contained in:
@@ -6,9 +6,12 @@ appId: ${APP_ID}
|
|||||||
- takeScreenshot: build/maestro/900-SignOutScreen
|
- takeScreenshot: build/maestro/900-SignOutScreen
|
||||||
- back
|
- back
|
||||||
- tapOn: "Sign out"
|
- tapOn: "Sign out"
|
||||||
- tapOn: "Sign out"
|
- tapOn:
|
||||||
|
id: "sign-out-submit"
|
||||||
# Ensure cancel cancels
|
# Ensure cancel cancels
|
||||||
- tapOn: "Cancel"
|
- tapOn: "Cancel"
|
||||||
- tapOn: "Sign out"
|
- tapOn:
|
||||||
- tapOn: "Sign out anyway"
|
id: "sign-out-submit"
|
||||||
|
- tapOn:
|
||||||
|
id: "dialog-positive"
|
||||||
- runFlow: ../assertions/assertInitDisplayed.yaml
|
- runFlow: ../assertions/assertInitDisplayed.yaml
|
||||||
|
|||||||
+5
-1
@@ -46,6 +46,8 @@ import io.element.android.libraries.designsystem.theme.progressIndicatorTrackCol
|
|||||||
import io.element.android.libraries.designsystem.utils.CommonDrawables
|
import io.element.android.libraries.designsystem.utils.CommonDrawables
|
||||||
import io.element.android.libraries.matrix.api.encryption.BackupUploadState
|
import io.element.android.libraries.matrix.api.encryption.BackupUploadState
|
||||||
import io.element.android.libraries.matrix.api.encryption.SteadyStateException
|
import io.element.android.libraries.matrix.api.encryption.SteadyStateException
|
||||||
|
import io.element.android.libraries.testtags.TestTags
|
||||||
|
import io.element.android.libraries.testtags.testTag
|
||||||
import io.element.android.libraries.theme.ElementTheme
|
import io.element.android.libraries.theme.ElementTheme
|
||||||
import io.element.android.libraries.ui.strings.CommonStrings
|
import io.element.android.libraries.ui.strings.CommonStrings
|
||||||
|
|
||||||
@@ -194,7 +196,9 @@ private fun BottomMenu(
|
|||||||
text = stringResource(id = signOutSubmitRes),
|
text = stringResource(id = signOutSubmitRes),
|
||||||
showProgress = logoutAction is Async.Loading,
|
showProgress = logoutAction is Async.Loading,
|
||||||
destructive = true,
|
destructive = true,
|
||||||
modifier = Modifier.fillMaxWidth(),
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.testTag(TestTags.signOut),
|
||||||
onClick = onLogoutClicked,
|
onClick = onLogoutClicked,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ android {
|
|||||||
// Should not be there, but this is a POC
|
// Should not be there, but this is a POC
|
||||||
implementation(libs.coil.compose)
|
implementation(libs.coil.compose)
|
||||||
implementation(libs.vanniktech.blurhash)
|
implementation(libs.vanniktech.blurhash)
|
||||||
|
implementation(projects.libraries.testtags)
|
||||||
implementation(projects.libraries.uiStrings)
|
implementation(projects.libraries.uiStrings)
|
||||||
|
|
||||||
ksp(libs.showkase.processor)
|
ksp(libs.showkase.processor)
|
||||||
|
|||||||
+7
@@ -43,6 +43,8 @@ import androidx.compose.ui.unit.dp
|
|||||||
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
|
import io.element.android.libraries.designsystem.preview.ElementThemedPreview
|
||||||
import io.element.android.libraries.designsystem.preview.PreviewGroup
|
import io.element.android.libraries.designsystem.preview.PreviewGroup
|
||||||
import io.element.android.libraries.designsystem.utils.CommonDrawables
|
import io.element.android.libraries.designsystem.utils.CommonDrawables
|
||||||
|
import io.element.android.libraries.testtags.TestTags
|
||||||
|
import io.element.android.libraries.testtags.testTag
|
||||||
import io.element.android.libraries.theme.ElementTheme
|
import io.element.android.libraries.theme.ElementTheme
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
|
|
||||||
@@ -113,18 +115,23 @@ internal fun SimpleAlertDialogContent(
|
|||||||
// If there is a 3rd item it should be at the end of the dialog
|
// If there is a 3rd item it should be at the end of the dialog
|
||||||
// Having this 3rd action is discouraged, see https://m3.material.io/components/dialogs/guidelines#e13b68f5-e367-4275-ad6f-c552ee8e358f
|
// Having this 3rd action is discouraged, see https://m3.material.io/components/dialogs/guidelines#e13b68f5-e367-4275-ad6f-c552ee8e358f
|
||||||
TextButton(
|
TextButton(
|
||||||
|
modifier = Modifier.testTag(TestTags.dialogNeutral),
|
||||||
text = thirdButtonText,
|
text = thirdButtonText,
|
||||||
size = ButtonSize.Medium,
|
size = ButtonSize.Medium,
|
||||||
onClick = onThirdButtonClicked,
|
onClick = onThirdButtonClicked,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
TextButton(
|
TextButton(
|
||||||
|
modifier = Modifier.testTag(
|
||||||
|
if (submitText == null) TestTags.dialogPositive else TestTags.dialogNegative
|
||||||
|
),
|
||||||
text = cancelText,
|
text = cancelText,
|
||||||
size = ButtonSize.Medium,
|
size = ButtonSize.Medium,
|
||||||
onClick = onCancelClicked,
|
onClick = onCancelClicked,
|
||||||
)
|
)
|
||||||
if (submitText != null) {
|
if (submitText != null) {
|
||||||
Button(
|
Button(
|
||||||
|
modifier = Modifier.testTag(TestTags.dialogPositive),
|
||||||
text = submitText,
|
text = submitText,
|
||||||
enabled = enabled,
|
enabled = enabled,
|
||||||
size = ButtonSize.Medium,
|
size = ButtonSize.Medium,
|
||||||
|
|||||||
@@ -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")
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sign out screen.
|
||||||
|
*/
|
||||||
|
val signOut = TestTag("sign-out-submit")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change server screen.
|
* Change server screen.
|
||||||
*/
|
*/
|
||||||
@@ -52,6 +57,13 @@ object TestTags {
|
|||||||
* RichTextEditor.
|
* RichTextEditor.
|
||||||
*/
|
*/
|
||||||
val richTextEditor = TestTag("rich_text_editor")
|
val richTextEditor = TestTag("rich_text_editor")
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Dialogs.
|
||||||
|
*/
|
||||||
|
val dialogPositive = TestTag("dialog-positive")
|
||||||
|
val dialogNegative = TestTag("dialog-negative")
|
||||||
|
val dialogNeutral = TestTag("dialog-neutral")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user