mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 06:55:41 +00:00
Update Maestro tests
This commit is contained in:
@@ -2,6 +2,9 @@ appId: ${MAESTRO_APP_ID}
|
|||||||
---
|
---
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "home_screen-settings"
|
id: "home_screen-settings"
|
||||||
|
- tapOn:
|
||||||
|
id: "settings-user_profile"
|
||||||
|
- assertVisible: "Your account"
|
||||||
- tapOn: "Remove this device"
|
- tapOn: "Remove this device"
|
||||||
- takeScreenshot: build/maestro/900-SignOutScreen
|
- takeScreenshot: build/maestro/900-SignOutScreen
|
||||||
- back
|
- back
|
||||||
@@ -9,7 +12,8 @@ appId: ${MAESTRO_APP_ID}
|
|||||||
# Ensure cancel cancels
|
# Ensure cancel cancels
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "dialog-negative"
|
id: "dialog-negative"
|
||||||
- tapOn: "Remove this device"
|
- tapOn:
|
||||||
|
id: "sign-out-submit"
|
||||||
- tapOn:
|
- tapOn:
|
||||||
id: "dialog-positive"
|
id: "dialog-positive"
|
||||||
- runFlow: ../assertions/assertInitDisplayed.yaml
|
- runFlow: ../assertions/assertInitDisplayed.yaml
|
||||||
|
|||||||
@@ -4,19 +4,35 @@ appId: ${MAESTRO_APP_ID}
|
|||||||
id: "home_screen-settings"
|
id: "home_screen-settings"
|
||||||
- assertVisible: "Settings"
|
- assertVisible: "Settings"
|
||||||
- takeScreenshot: build/maestro/600-Settings
|
- takeScreenshot: build/maestro/600-Settings
|
||||||
|
|
||||||
|
## App settings section
|
||||||
|
- assertVisible: "Appearance"
|
||||||
|
|
||||||
|
- tapOn:
|
||||||
|
text: "Media upload quality"
|
||||||
|
- assertVisible: "Media upload quality"
|
||||||
|
- back
|
||||||
|
|
||||||
|
- tapOn:
|
||||||
|
text: "Screen lock"
|
||||||
|
- assertVisible: "Choose PIN"
|
||||||
|
- hideKeyboard
|
||||||
|
- back
|
||||||
|
|
||||||
|
- tapOn:
|
||||||
|
text: "Location sharing"
|
||||||
|
- assertVisible: "Live location updates"
|
||||||
|
- back
|
||||||
|
|
||||||
|
## General section
|
||||||
- tapOn:
|
- tapOn:
|
||||||
text: "Analytics"
|
text: "Analytics"
|
||||||
- assertVisible: "Share analytics data"
|
- assertVisible: "Share analytics data"
|
||||||
- back
|
- back
|
||||||
|
|
||||||
- tapOn:
|
- tapOn:
|
||||||
text: "Notifications"
|
text: "Labs"
|
||||||
- assertVisible: "Enable notifications on this device"
|
- assertVisible: "Feeling experimental?"
|
||||||
- back
|
|
||||||
|
|
||||||
- tapOn:
|
|
||||||
text: "Report a problem"
|
|
||||||
- assertVisible: "Report a problem"
|
|
||||||
- back
|
- back
|
||||||
|
|
||||||
- tapOn:
|
- tapOn:
|
||||||
@@ -27,20 +43,32 @@ appId: ${MAESTRO_APP_ID}
|
|||||||
- back
|
- back
|
||||||
|
|
||||||
- tapOn:
|
- tapOn:
|
||||||
text: "Screen lock"
|
text: "Developer options"
|
||||||
- assertVisible: "Choose PIN"
|
- assertVisible: "Feature flags"
|
||||||
- hideKeyboard
|
|
||||||
- back
|
|
||||||
|
|
||||||
- tapOn:
|
|
||||||
text: "Advanced settings"
|
|
||||||
- assertVisible: "View source"
|
- assertVisible: "View source"
|
||||||
- back
|
- back
|
||||||
|
|
||||||
|
## Account settings
|
||||||
- tapOn:
|
- tapOn:
|
||||||
text: "Developer options"
|
id: "settings-user_profile"
|
||||||
- assertVisible: "Feature flags"
|
- assertVisible: "Your account"
|
||||||
|
- takeScreenshot: build/maestro/610-AccountSettings
|
||||||
|
|
||||||
|
- tapOn:
|
||||||
|
text: "Notifications"
|
||||||
|
- assertVisible: "Enable notifications on this device"
|
||||||
|
- back
|
||||||
|
|
||||||
|
- tapOn:
|
||||||
|
text: "Moderation & safety"
|
||||||
|
- assertVisible: "Your appearance"
|
||||||
|
- back
|
||||||
|
|
||||||
|
- tapOn:
|
||||||
|
text: "Report a problem"
|
||||||
|
- assertVisible: "Report a problem"
|
||||||
- back
|
- back
|
||||||
|
|
||||||
|
- back
|
||||||
- back
|
- back
|
||||||
- runFlow: ../assertions/assertHomeDisplayed.yaml
|
- runFlow: ../assertions/assertHomeDisplayed.yaml
|
||||||
|
|||||||
+16
-12
@@ -66,6 +66,8 @@ import io.element.android.libraries.emoji.api.picker.EmojiPickerRenderer
|
|||||||
import io.element.android.libraries.emoji.api.picker.NoOpEmojiPickerRenderer
|
import io.element.android.libraries.emoji.api.picker.NoOpEmojiPickerRenderer
|
||||||
import io.element.android.libraries.matrix.ui.components.MatrixUserRow
|
import io.element.android.libraries.matrix.ui.components.MatrixUserRow
|
||||||
import io.element.android.libraries.matrix.ui.model.getAvatarData
|
import io.element.android.libraries.matrix.ui.model.getAvatarData
|
||||||
|
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
|
||||||
import kotlinx.collections.immutable.toImmutableList
|
import kotlinx.collections.immutable.toImmutableList
|
||||||
|
|
||||||
@@ -95,9 +97,11 @@ fun PreferencesRootView(
|
|||||||
snackbarHost = { SnackbarHost(snackbarHostState) }
|
snackbarHost = { SnackbarHost(snackbarHostState) }
|
||||||
) {
|
) {
|
||||||
UserPreferences(
|
UserPreferences(
|
||||||
modifier = Modifier.clickable {
|
modifier = Modifier
|
||||||
onOpenAccountSettings()
|
.testTag(TestTags.settingsUserProfile)
|
||||||
},
|
.clickable {
|
||||||
|
onOpenAccountSettings()
|
||||||
|
},
|
||||||
matrixUser = state.myUser,
|
matrixUser = state.myUser,
|
||||||
)
|
)
|
||||||
if (state.userStatusState != null) {
|
if (state.userStatusState != null) {
|
||||||
@@ -152,8 +156,8 @@ private fun BoxScope.UserStatusUpdateIndicator(updateStatusAction: AsyncAction<U
|
|||||||
AsyncActionIndicator(
|
AsyncActionIndicator(
|
||||||
asyncAction = updateStatusAction,
|
asyncAction = updateStatusAction,
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.TopCenter)
|
.align(Alignment.TopCenter)
|
||||||
.statusBarsPadding(),
|
.statusBarsPadding(),
|
||||||
loading = { AsyncIndicator.Loading(text = stringResource(CommonStrings.common_saving)) },
|
loading = { AsyncIndicator.Loading(text = stringResource(CommonStrings.common_saving)) },
|
||||||
failure = { _ -> AsyncIndicator.Failure(text = stringResource(CommonStrings.common_failed)) },
|
failure = { _ -> AsyncIndicator.Failure(text = stringResource(CommonStrings.common_failed)) },
|
||||||
)
|
)
|
||||||
@@ -248,10 +252,10 @@ private fun ColumnScope.MultiAccountSection(
|
|||||||
state.otherSessions.forEach { matrixUser ->
|
state.otherSessions.forEach { matrixUser ->
|
||||||
MatrixUserRow(
|
MatrixUserRow(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.clickable {
|
.clickable {
|
||||||
state.eventSink(PreferencesRootEvent.SwitchToSession(matrixUser.userId))
|
state.eventSink(PreferencesRootEvent.SwitchToSession(matrixUser.userId))
|
||||||
}
|
}
|
||||||
.padding(top = 2.dp, bottom = 2.dp, end = 8.dp),
|
.padding(top = 2.dp, bottom = 2.dp, end = 8.dp),
|
||||||
matrixUser = matrixUser,
|
matrixUser = matrixUser,
|
||||||
avatarSize = AvatarSize.AccountItem,
|
avatarSize = AvatarSize.AccountItem,
|
||||||
verticalSpaceWidth = 16.dp,
|
verticalSpaceWidth = 16.dp,
|
||||||
@@ -359,9 +363,9 @@ private fun ColumnScope.Footer(
|
|||||||
) {
|
) {
|
||||||
Text(
|
Text(
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.align(Alignment.CenterHorizontally)
|
.align(Alignment.CenterHorizontally)
|
||||||
.clickable(enabled = onClick != null, onClick = onClick ?: {})
|
.clickable(enabled = onClick != null, onClick = onClick ?: {})
|
||||||
.padding(start = 16.dp, end = 16.dp, top = 16.dp, bottom = 24.dp),
|
.padding(start = 16.dp, end = 16.dp, top = 16.dp, bottom = 24.dp),
|
||||||
textAlign = TextAlign.Center,
|
textAlign = TextAlign.Center,
|
||||||
text = version,
|
text = version,
|
||||||
style = ElementTheme.typography.fontBodySmRegular,
|
style = ElementTheme.typography.fontBodySmRegular,
|
||||||
|
|||||||
@@ -48,6 +48,11 @@ object TestTags {
|
|||||||
val homeScreenSettings = TestTag("home_screen-settings")
|
val homeScreenSettings = TestTag("home_screen-settings")
|
||||||
val homeScreenClearFilters = TestTag("home_screen-clear_filters")
|
val homeScreenClearFilters = TestTag("home_screen-clear_filters")
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Settings screen.
|
||||||
|
*/
|
||||||
|
val settingsUserProfile = TestTag("settings-user_profile")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Room detail screen.
|
* Room detail screen.
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user