mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 10:32:34 +00:00
Fix: Maestro tests fail when using settings (#358)
* Fix Maestro tests using 'Settings' to open the settings screen. * Try to allow manually running Maestro tests. * Also adjust logout flow.
This commit is contained in:
committed by
GitHub
parent
40f927fbdf
commit
0389f782c9
@@ -16,7 +16,7 @@ jobs:
|
|||||||
maestro-cloud:
|
maestro-cloud:
|
||||||
name: Maestro test suite
|
name: Maestro test suite
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event.review.state == 'approved'
|
if: github.event.review.state == 'approved' || github.event_name == 'workflow_dispatch'
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
# Allow one per PR.
|
# Allow one per PR.
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
appId: ${APP_ID}
|
appId: ${APP_ID}
|
||||||
---
|
---
|
||||||
- tapOn: "Settings"
|
- tapOn:
|
||||||
|
id: "home_screen-settings"
|
||||||
- tapOn: "Sign out"
|
- tapOn: "Sign out"
|
||||||
- takeScreenshot: build/maestro/900-SignOutDialg
|
- takeScreenshot: build/maestro/900-SignOutDialg
|
||||||
# Ensure cancel cancels
|
# Ensure cancel cancels
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
appId: ${APP_ID}
|
appId: ${APP_ID}
|
||||||
---
|
---
|
||||||
- tapOn: "Settings"
|
- tapOn:
|
||||||
|
id: "home_screen-settings"
|
||||||
- assertVisible: "Rageshake to report bug"
|
- assertVisible: "Rageshake to report bug"
|
||||||
- takeScreenshot: build/maestro/600-Settings
|
- takeScreenshot: build/maestro/600-Settings
|
||||||
- tapOn:
|
- tapOn:
|
||||||
|
|||||||
+7
-2
@@ -45,6 +45,8 @@ import io.element.android.libraries.designsystem.theme.components.Text
|
|||||||
import io.element.android.libraries.designsystem.utils.LogCompositions
|
import io.element.android.libraries.designsystem.utils.LogCompositions
|
||||||
import io.element.android.libraries.matrix.api.core.UserId
|
import io.element.android.libraries.matrix.api.core.UserId
|
||||||
import io.element.android.libraries.matrix.ui.model.MatrixUser
|
import io.element.android.libraries.matrix.ui.model.MatrixUser
|
||||||
|
import io.element.android.libraries.testtags.TestTags
|
||||||
|
import io.element.android.libraries.testtags.testTag
|
||||||
import io.element.android.libraries.ui.strings.R as StringR
|
import io.element.android.libraries.ui.strings.R as StringR
|
||||||
|
|
||||||
@OptIn(ExperimentalMaterial3Api::class)
|
@OptIn(ExperimentalMaterial3Api::class)
|
||||||
@@ -101,14 +103,17 @@ private fun DefaultRoomListTopBar(
|
|||||||
},
|
},
|
||||||
navigationIcon = {
|
navigationIcon = {
|
||||||
if (matrixUser != null) {
|
if (matrixUser != null) {
|
||||||
IconButton(onClick = onOpenSettings) {
|
IconButton(
|
||||||
|
modifier = Modifier.testTag(TestTags.homeScreenSettings),
|
||||||
|
onClick = onOpenSettings
|
||||||
|
) {
|
||||||
Avatar(matrixUser.avatarData, contentDescription = stringResource(StringR.string.common_settings))
|
Avatar(matrixUser.avatarData, contentDescription = stringResource(StringR.string.common_settings))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions = {
|
actions = {
|
||||||
IconButton(
|
IconButton(
|
||||||
onClick = onSearchClicked
|
onClick = onSearchClicked,
|
||||||
) {
|
) {
|
||||||
Icon(Icons.Default.Search, contentDescription = stringResource(StringR.string.action_search))
|
Icon(Icons.Default.Search, contentDescription = stringResource(StringR.string.action_search))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,6 +38,11 @@ object TestTags {
|
|||||||
*/
|
*/
|
||||||
val changeServerServer = TestTag("change_server-server")
|
val changeServerServer = TestTag("change_server-server")
|
||||||
val changeServerContinue = TestTag("change_server-continue")
|
val changeServerContinue = TestTag("change_server-continue")
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Room list / Home screen.
|
||||||
|
*/
|
||||||
|
val homeScreenSettings = TestTag("home_screen-settings")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user