mirror of
https://github.com/bulwarkmail/native.git
synced 2026-10-31 00:06:17 +00:00
ci: match ios drawer rows by their joined label and keep failed-step hierarchies
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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,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
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user