ci: tap the ios push banner right after the push

This commit is contained in:
Linus Rath
2026-10-22 13:38:54 +02:00
parent 96471cf13b
commit 5f06c3918c
3 changed files with 26 additions and 47 deletions
+18 -18
View File
@@ -35,41 +35,41 @@ tags:
timeout: 3000
- pressKey: Home
# 1. The banner shows (and what it says).
- evalScript: ${output.subject0 = 'E2E push banner ' + Date.now()}
- runScript:
file: ../scripts/helper.js
env:
CALL: /simpush?to=${ACCOUNT}&subject=${encodeURIComponent(output.subject0)}
- extendedWaitUntil:
visible: ".*${output.subject0}.*|.*New message.*"
timeout: 30000
- takeScreenshot: push-01-banner
# 2. A tap opens the message, app in the background. The banner shows for a
# few seconds and finding it takes Maestro about as long; taps on the lock
# screen list do nothing on these simulators. So tap where the banner
# appears, right after the push.
- evalScript: ${output.subject = 'E2E push ' + Date.now()}
- runScript:
file: ../scripts/helper.js
env:
CALL: /simpush?to=${ACCOUNT}&subject=${encodeURIComponent(output.subject)}
# The banner shows for a few seconds: catch it with either text, then check.
- extendedWaitUntil:
visible: ".*${output.subject}.*|.*New message.*"
timeout: 30000
- takeScreenshot: push-01-banner
- runFlow:
file: ../subflows/tap-notification.yaml
env:
TEXT: ".*${output.subject}.*|.*New message.*"
- runFlow: ../subflows/tap-banner.yaml
- extendedWaitUntil:
visible: "Reply All"
timeout: 60000
- assertVisible: ".*${output.subject}.*"
- takeScreenshot: push-02-opened-warm
# Cold start: the app isn't running when the notification is tapped.
# 3. The same from a cold start: the app isn't running.
- stopApp
- evalScript: ${output.subject2 = 'E2E push cold ' + Date.now()}
- runScript:
file: ../scripts/helper.js
env:
CALL: /simpush?to=${ACCOUNT}&subject=${encodeURIComponent(output.subject2)}
- extendedWaitUntil:
visible: ".*${output.subject2}.*|.*New message.*"
timeout: 30000
- takeScreenshot: push-03-banner-cold
- runFlow:
file: ../subflows/tap-notification.yaml
env:
TEXT: ".*${output.subject2}.*|.*New message.*"
- runFlow: ../subflows/tap-banner.yaml
- extendedWaitUntil:
visible: "Reply All"
timeout: 90000
+8
View File
@@ -0,0 +1,8 @@
# Tap the notification banner at the top of the screen, at once (it shows
# for a few seconds only).
appId: org.bulwarkmail.mobile
---
- tapOn:
point: "50%,9%"
waitToSettleTimeoutMs: 500
retryTapIfNoChange: false
-29
View File
@@ -1,29 +0,0 @@
# Tap the notification matching TEXT in Notification Center. The banner
# goes away after a few seconds, often between Maestro finding it and
# tapping it (the tap then lands on whatever is below): wait until it is
# gone, pull Notification Center down from the top left, and tap there.
# A tap while the pull-down still moves does nothing, so tap until the
# notification is gone (the app opened).
appId: org.bulwarkmail.mobile
---
- extendedWaitUntil:
notVisible: ${TEXT}
timeout: 15000
optional: true
- swipe:
start: 20%,1%
end: 20%,60%
duration: 500
- extendedWaitUntil:
visible: ${TEXT}
timeout: 10000
- waitForAnimationToEnd:
timeout: 3000
- repeat:
while:
visible: ${TEXT}
times: 3
commands:
- tapOn: ${TEXT}
- waitForAnimationToEnd:
timeout: 4000