ci: type the first character alone in ios flows and answer the webmail hand-over prompt

This commit is contained in:
Linus Rath
2026-10-22 03:55:43 +02:00
parent 02bd714afd
commit 96d9d54cc9
9 changed files with 88 additions and 36 deletions
+8 -10
View File
@@ -1,13 +1,11 @@
# Empty the field with id FIELD. A tap puts the cursor where it lands, and
# eraseText only deletes before the cursor, so select everything first.
# Empty the field with id FIELD. A tap puts the cursor where it lands and
# eraseText only deletes before the cursor, so erase in passes: each tap
# lands in the middle of what is left.
appId: org.bulwarkmail.mobile
---
- longPressOn:
id: ${FIELD}
- runFlow:
when:
visible: "Select All"
- repeat:
times: 4
commands:
- tapOn: "Select All"
- pressKey: Backspace
- eraseText: 120
- tapOn:
id: ${FIELD}
- eraseText: 100
+2 -1
View File
@@ -2,7 +2,8 @@
appId: org.bulwarkmail.mobile
---
- runFlow: open-drawer.yaml
- tapOn: ${FOLDER}
# A folder row reads "<name> <unread> / <total>".
- tapOn: ${FOLDER}( .*)?
- extendedWaitUntil:
visible: ${FOLDER}
timeout: 15000
+2 -1
View File
@@ -15,4 +15,5 @@ appId: org.bulwarkmail.mobile
visible:
id: email-row
timeout: 60000
- assertVisible: ${INBOX_TEXT || 'Your verification code'}
# Rows are one element: sender, subject and preview together.
- assertVisible: ${INBOX_TEXT || '.*Your verification code.*'}
+1 -1
View File
@@ -8,5 +8,5 @@ appId: org.bulwarkmail.mobile
commands:
- tapOn: "Toggle menu"
- extendedWaitUntil:
visible: "Scheduled"
visible: "Scheduled.*"
timeout: 10000
+10 -4
View File
@@ -6,10 +6,16 @@ appId: org.bulwarkmail.mobile
visible: "you@example.com"
timeout: 60000
- takeScreenshot: stalwart-login-page
- tapOn: "you@example.com"
- inputText: ${LOGIN}
- tapOn: "••••••••"
- inputText: ${PASSWORD}
- runFlow:
file: type-web.yaml
env:
HINT: "you@example.com"
TEXT: ${LOGIN}
- runFlow:
file: type-web.yaml
env:
HINT: "••••••••"
TEXT: ${PASSWORD}
- runFlow:
when:
true: ${TOTP == 'yes'}
+11 -4
View File
@@ -1,9 +1,10 @@
# Type a secret into the field with id FIELD (TAP=no for a field that focuses
# itself, see type.yaml). The value can't be checked (a secure field shows
# dots) and must never be shown, so a lost keystroke surfaces as a failed
# sign-in.
# itself; see type.yaml for why the first character goes alone). The value
# can't be checked (a secure field shows dots) and must never be shown, so a
# lost keystroke surfaces as a failed sign-in.
appId: org.bulwarkmail.mobile
---
- evalScript: ${output.secretHead = TEXT.slice(0, 1); output.secretTail = TEXT.slice(1)}
- runFlow:
when:
true: ${TAP != 'no'}
@@ -12,4 +13,10 @@ appId: org.bulwarkmail.mobile
id: ${FIELD}
- waitForAnimationToEnd:
timeout: 3000
- inputText: ${TEXT}
- inputText: ${output.secretHead}
# A short pause: wait for something that never shows.
- extendedWaitUntil:
visible: "zz-no-such-element-zz"
timeout: 1000
optional: true
- inputText: ${output.secretTail}
+14
View File
@@ -0,0 +1,14 @@
# Type TEXT into a web page field found by its placeholder HINT (the sign-in
# pages in the auth session). First character alone, as in type.yaml.
appId: org.bulwarkmail.mobile
---
- evalScript: ${output.webHead = TEXT.slice(0, 1); output.webTail = TEXT.slice(1)}
- tapOn: ${HINT}
- waitForAnimationToEnd:
timeout: 3000
- inputText: ${output.webHead}
- extendedWaitUntil:
visible: "zz-no-such-element-zz"
timeout: 1000
optional: true
- inputText: ${output.webTail}
+24 -11
View File
@@ -1,12 +1,14 @@
# Type TEXT into the field with id FIELD and check it arrived in full.
#
# iOS drops keystrokes while the edit menu (the "AutoFill" bubble) opens,
# which happens when a flow taps a field that already has focus. Maestro
# can't see the focus of a React Native field, so a caller passes TAP=no for
# a field that focuses itself. Retyped up to twice if text got lost (the
# retry taps: by then the field has focus and the menu is harmless).
# iOS drops keystrokes in two situations seen on the CI simulator: while the
# edit menu (the "AutoFill" bubble) opens, which happens when a flow taps a
# field that already has focus, and right after the first character, while
# the field re-renders. So: no tap for a field that focuses itself (TAP=no;
# Maestro can't see a React Native field's focus), type the first character,
# wait until it shows, then type the rest. Retyped up to twice.
appId: org.bulwarkmail.mobile
---
- evalScript: ${output.typeHead = TEXT.slice(0, 1); output.typeTail = TEXT.slice(1)}
- runFlow:
when:
true: ${TAP != 'no'}
@@ -21,7 +23,14 @@ appId: org.bulwarkmail.mobile
true: ${ERASE == 'yes'}
commands:
- runFlow: clear-field.yaml
- inputText: ${TEXT}
- inputText: ${output.typeHead}
- extendedWaitUntil:
visible:
id: ${FIELD}
text: "${output.typeHead}.*"
timeout: 5000
optional: true
- inputText: ${output.typeTail}
- runFlow:
when:
notVisible:
@@ -31,11 +40,15 @@ appId: org.bulwarkmail.mobile
- retry:
maxRetries: 2
commands:
- runFlow:
file: clear-field.yaml
- waitForAnimationToEnd:
timeout: 1000
- inputText: ${TEXT}
- runFlow: clear-field.yaml
- inputText: ${output.typeHead}
- extendedWaitUntil:
visible:
id: ${FIELD}
text: "${output.typeHead}.*"
timeout: 5000
optional: true
- inputText: ${output.typeTail}
- assertVisible:
id: ${FIELD}
text: ${TEXT_PATTERN || TEXT}
+16 -4
View File
@@ -6,10 +6,16 @@ appId: org.bulwarkmail.mobile
visible: "user@example.com"
timeout: 60000
- takeScreenshot: webmail-login-page
- tapOn: "user@example.com"
- inputText: ${LOGIN}
- tapOn: "Enter your password"
- inputText: ${PASSWORD}
- runFlow:
file: type-web.yaml
env:
HINT: "user@example.com"
TEXT: ${LOGIN}
- runFlow:
file: type-web.yaml
env:
HINT: "Enter your password"
TEXT: ${PASSWORD}
- tapOn: "Sign in"
- runFlow:
when:
@@ -26,3 +32,9 @@ appId: org.bulwarkmail.mobile
- inputText: ${output.helper.code}
- tapOn: "Sign in|Verify"
# Before handing over, the webmail asks whether the app may take the sign-in.
- extendedWaitUntil:
visible: "Hand over to the app"
timeout: 60000
- takeScreenshot: webmail-handover-prompt
- tapOn: "Hand over to the app"