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 206579e647
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 31 additions and 23 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,8 @@
appId: ${APP_ID}
---
- takeScreenshot: build/maestro/510-Timeline
- tapOn: "Message"
- tapOn:
id: "rich_text_editor"
- inputText: "Hello world!"
- tapOn: "Send"
- 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.
*/
@OptIn(ExperimentalComposeUiApi::class)
fun Modifier.testTag(id: TestTag) = this.then(
semantics {
testTag = id.value
testTagsAsResourceId = true
}
)
fun Modifier.testTag(id: TestTag) = semantics {
testTag = id.value
testTagsAsResourceId = true
}

View file

@ -47,6 +47,11 @@ object TestTags {
* Welcome screen.
*/
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.matrixui)
implementation(projects.libraries.designsystem)
implementation(projects.libraries.testtags)
implementation(libs.androidx.constraintlayout)
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.AttachmentThumbnailInfo
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.FormattingOptionState
import io.element.android.libraries.theme.ElementTheme
@ -255,7 +257,8 @@ private fun TextInput(
start = 12.dp.applyScaleUp(),
end = 42.dp.applyScaleUp()
)
),
)
.testTag(TestTags.richTextEditor),
contentAlignment = Alignment.CenterStart,
) {

View file

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

View file

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

View file

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

View file

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