diff --git a/.maestro/features/03-compose-send.yaml b/.maestro/features/03-compose-send.yaml index efbe5332..85a9ef89 100644 --- a/.maestro/features/03-compose-send.yaml +++ b/.maestro/features/03-compose-send.yaml @@ -36,16 +36,21 @@ tags: - assertVisible: "Files" - takeScreenshot: compose-02-attach-sheet - tapOn: "Photos & Videos" +# The system photo picker (another process) opens over the composer. +# (Optional until we know what XCTest sees of it; the screenshot shows it.) +- extendedWaitUntil: + notVisible: "Draft saved|New Message" + timeout: 10000 + optional: true - waitForAnimationToEnd: timeout: 5000 - takeScreenshot: compose-03-photo-picker -# Dismiss the picker sheet. -- swipe: - start: 50%,12% - end: 50%,95% - duration: 400 -- waitForAnimationToEnd: - timeout: 3000 +# Close it: its Cancel button if XCTest sees it, else swipe the sheet down. +- runFlow: + when: + visible: "Cancel" + commands: + - tapOn: "Cancel" - runFlow: when: notVisible: "New Message" @@ -54,6 +59,14 @@ tags: start: 50%,12% end: 50%,95% duration: 400 +- waitForAnimationToEnd: + timeout: 3000 +# A swipe too many closes the composer: keep it. +- runFlow: + when: + visible: "Save or discard draft?" + commands: + - tapOn: "Cancel" - extendedWaitUntil: visible: "New Message" timeout: 10000 diff --git a/.maestro/subflows/compose-body.yaml b/.maestro/subflows/compose-body.yaml index 6c1a58c6..a01dd410 100644 --- a/.maestro/subflows/compose-body.yaml +++ b/.maestro/subflows/compose-body.yaml @@ -8,10 +8,15 @@ appId: org.bulwarkmail.mobile visible: "Write your message.*" commands: - tapOn: "Write your message.*" +# A tap on the WebView doesn't always take the focus from the Subject field +# (on the iPad the body once went into Subject): drop the keyboard first. - runFlow: when: notVisible: "Write your message.*" commands: + - hideKeyboard + - waitForAnimationToEnd: + timeout: 2000 - tapOn: point: "50%,50%" - waitForAnimationToEnd: