ci: match ios drawer rows by their joined label and keep failed-step hierarchies

This commit is contained in:
Linus Rath
2026-10-22 04:40:42 +02:00
parent 96d9d54cc9
commit ca09708fd1
4 changed files with 29 additions and 12 deletions
+9 -9
View File
@@ -10,12 +10,12 @@ tags:
- assertVisible: ".*Your verification code.*"
- runFlow: ../subflows/open-drawer.yaml
- takeScreenshot: folders-02-drawer
- assertVisible: "Inbox.*"
- assertVisible: "Sent.*"
- assertVisible: "Drafts.*"
- assertVisible: "Archive.*"
- assertVisible: "Projects.*"
- tapOn: "Archive.*"
- assertVisible: "Inbox([ ,].*)?"
- assertVisible: "Sent([ ,].*)?"
- assertVisible: "Drafts([ ,].*)?"
- assertVisible: "Archive([ ,].*)?"
- assertVisible: "Projects([ ,].*)?"
- tapOn: "Archive([ ,].*)?"
- extendedWaitUntil:
visible: ".*Invoice 2025-12.*"
timeout: 20000
@@ -24,13 +24,13 @@ tags:
# Projects/Alpha holds the seeded thread.
- runFlow:
when:
notVisible: "Alpha.*"
notVisible: "Alpha([ ,].*)?"
commands:
- tapOn:
text: "Expand"
rightOf: "Projects.*"
rightOf: "Projects([ ,].*)?"
optional: true
- tapOn: "Alpha.*"
- tapOn: "Alpha([ ,].*)?"
- extendedWaitUntil:
visible: ".*Project Alpha kickoff.*"
timeout: 20000
+1 -1
View File
@@ -62,7 +62,7 @@ tags:
- runFlow:
file: ../subflows/go-to-folder.yaml
env:
FOLDER: "Alpha.*"
FOLDER: Alpha
- runFlow:
file: ../subflows/open-message.yaml
env:
+2 -2
View File
@@ -2,8 +2,8 @@
appId: org.bulwarkmail.mobile
---
- runFlow: open-drawer.yaml
# A folder row reads "<name> <unread> / <total>".
- tapOn: ${FOLDER}( .*)?
# A folder row's label joins its texts: "<name>, <unread>, /, <total>".
- tapOn: ${FOLDER}([ ,].*)?
- extendedWaitUntil:
visible: ${FOLDER}
timeout: 15000
+17
View File
@@ -68,4 +68,21 @@ for (const file of walkFiles(root).filter((f) => /commands-.*\.json$/.test(f)))
}
}
}
// Maestro 2 keeps the screen hierarchy of each failed step under
// screen-hierarchy/; it holds what the screen showed (like the screenshot).
for (const file of walkFiles(root).filter((f) => f.includes('screen-hierarchy') && f.endsWith('.json'))) {
let data;
try {
data = JSON.parse(fs.readFileSync(file, 'utf8'));
} catch {
continue;
}
const h = findHierarchy(data);
if (!h) continue;
const parts = file.split(path.sep).join('/').split('/');
out.push(`== ${parts[parts.length - 3]} / ${parts[parts.length - 1]}`);
const lines = [];
tree(h, 0, lines);
out.push(...lines.slice(0, 300).map((l) => ` ${l}`));
}
process.stdout.write(out.join('\n') + '\n');