Merge pull request #1308 from vector-im/feature/fixMaestro

Fix Maestro test.
This commit is contained in:
Benoit Marty 2023-09-14 11:30:21 +02:00 committed by GitHub
commit fcd33c7721
16 changed files with 31 additions and 23 deletions

View file

@ -15,7 +15,7 @@ appId: ${APP_ID}
- tapOn: "gnuradio.org" - tapOn: "gnuradio.org"
- extendedWaitUntil: - extendedWaitUntil:
visible: "This server currently doesnt support sliding sync." visible: "This server currently doesnt support sliding sync."
timeout: 10_000 timeout: 10000
- tapOn: "Cancel" - tapOn: "Cancel"
- back - back
- back - back

View file

@ -2,4 +2,4 @@ appId: ${APP_ID}
--- ---
- extendedWaitUntil: - extendedWaitUntil:
visible: "Help improve Element X dbg" visible: "Help improve Element X dbg"
timeout: 10_000 timeout: 10000

View file

@ -2,4 +2,4 @@ appId: ${APP_ID}
--- ---
- extendedWaitUntil: - extendedWaitUntil:
visible: "All Chats" visible: "All Chats"
timeout: 10_000 timeout: 10000

View file

@ -2,4 +2,4 @@ appId: ${APP_ID}
--- ---
- extendedWaitUntil: - extendedWaitUntil:
visible: "Be in your element" visible: "Be in your element"
timeout: 10_000 timeout: 10000

View file

@ -2,4 +2,4 @@ appId: ${APP_ID}
--- ---
- extendedWaitUntil: - extendedWaitUntil:
visible: "Change account provider" visible: "Change account provider"
timeout: 10_000 timeout: 10000

View file

@ -2,4 +2,4 @@ appId: ${APP_ID}
--- ---
- extendedWaitUntil: - extendedWaitUntil:
visible: ${ROOM_NAME} visible: ${ROOM_NAME}
timeout: 10_000 timeout: 10000

View file

@ -3,4 +3,4 @@ appId: ${APP_ID}
- extendedWaitUntil: - extendedWaitUntil:
visible: visible:
id: "welcome_screen-title" id: "welcome_screen-title"
timeout: 10_000 timeout: 10000

View file

@ -1,7 +1,8 @@
appId: ${APP_ID} appId: ${APP_ID}
--- ---
- takeScreenshot: build/maestro/510-Timeline - takeScreenshot: build/maestro/510-Timeline
- tapOn: "Message" - tapOn:
id: "rich_text_editor"
- inputText: "Hello world!" - inputText: "Hello world!"
- tapOn: "Send" - tapOn: "Send"
- hideKeyboard - hideKeyboard

View file

@ -26,9 +26,7 @@ import androidx.compose.ui.semantics.testTagsAsResourceId
* Add a testTag to a Modifier, to be used by external tool, like TrafficLight for instance. * Add a testTag to a Modifier, to be used by external tool, like TrafficLight for instance.
*/ */
@OptIn(ExperimentalComposeUiApi::class) @OptIn(ExperimentalComposeUiApi::class)
fun Modifier.testTag(id: TestTag) = this.then( fun Modifier.testTag(id: TestTag) = semantics {
semantics { testTag = id.value
testTag = id.value testTagsAsResourceId = true
testTagsAsResourceId = true }
}
)

View file

@ -47,6 +47,11 @@ object TestTags {
* Welcome screen. * Welcome screen.
*/ */
val welcomeScreenTitle = TestTag("welcome_screen-title") val welcomeScreenTitle = TestTag("welcome_screen-title")
/**
* RichTextEditor.
*/
val richTextEditor = TestTag("rich_text_editor")
} }

View file

@ -31,6 +31,7 @@ dependencies {
implementation(projects.libraries.matrix.api) implementation(projects.libraries.matrix.api)
implementation(projects.libraries.matrixui) implementation(projects.libraries.matrixui)
implementation(projects.libraries.designsystem) implementation(projects.libraries.designsystem)
implementation(projects.libraries.testtags)
implementation(libs.androidx.constraintlayout) implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.constraintlayout.compose) implementation(libs.androidx.constraintlayout.compose)

View file

@ -74,6 +74,8 @@ import io.element.android.libraries.matrix.api.media.MediaSource
import io.element.android.libraries.matrix.ui.components.AttachmentThumbnail import io.element.android.libraries.matrix.ui.components.AttachmentThumbnail
import io.element.android.libraries.matrix.ui.components.AttachmentThumbnailInfo import io.element.android.libraries.matrix.ui.components.AttachmentThumbnailInfo
import io.element.android.libraries.matrix.ui.components.AttachmentThumbnailType import io.element.android.libraries.matrix.ui.components.AttachmentThumbnailType
import io.element.android.libraries.testtags.TestTags
import io.element.android.libraries.testtags.testTag
import io.element.android.libraries.textcomposer.components.FormattingOption import io.element.android.libraries.textcomposer.components.FormattingOption
import io.element.android.libraries.textcomposer.components.FormattingOptionState import io.element.android.libraries.textcomposer.components.FormattingOptionState
import io.element.android.libraries.theme.ElementTheme import io.element.android.libraries.theme.ElementTheme
@ -255,7 +257,8 @@ private fun TextInput(
start = 12.dp.applyScaleUp(), start = 12.dp.applyScaleUp(),
end = 42.dp.applyScaleUp() end = 42.dp.applyScaleUp()
) )
), )
.testTag(TestTags.richTextEditor),
contentAlignment = Alignment.CenterStart, contentAlignment = Alignment.CenterStart,
) { ) {

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:c8a6aa5c7bdddcb18453efc47f90dd0301173bcfa5622abc0821eb09cb2579d8 oid sha256:856fc14eb010048f355c902419d7d346f77bfb26e79bbba7e966363a39f503f5
size 25149 size 24884

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:b6344d9976849f1e56782a463fcca625943a7c6adf74c598c7a58245809b9db5 oid sha256:d4329c822e128dcfa495df0c81126d929fa5f787e28f3c144009aaaaafae4dc6
size 53642 size 53371

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:602d7585b9693d08b1a4e3e620f2cecbbbde2a9b0e6b2beeb77f244520c5e4eb oid sha256:8222670d7b08fc9f5e446e86a31fad4fa773bbac03742df9bb5dfb35189571aa
size 25827 size 25617

View file

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:fd7e6fc09011429e0fe19bff73d3c48124b1f3bed74d3cb12c9f3f0405f53980 oid sha256:a4830db08b7e09971e299c31f18ce45dfa500c59a056b407c7df397b679e23d3
size 55728 size 55455