diff --git a/.maestro/features/01-folders.yaml b/.maestro/features/01-folders.yaml index 406d27ae..ec0f26d5 100644 --- a/.maestro/features/01-folders.yaml +++ b/.maestro/features/01-folders.yaml @@ -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 diff --git a/.maestro/features/02-read-messages.yaml b/.maestro/features/02-read-messages.yaml index 7dd19dfe..ffa6cdec 100644 --- a/.maestro/features/02-read-messages.yaml +++ b/.maestro/features/02-read-messages.yaml @@ -62,7 +62,7 @@ tags: - runFlow: file: ../subflows/go-to-folder.yaml env: - FOLDER: "Alpha.*" + FOLDER: Alpha - runFlow: file: ../subflows/open-message.yaml env: diff --git a/.maestro/subflows/go-to-folder.yaml b/.maestro/subflows/go-to-folder.yaml index 77587690..8c9526cf 100644 --- a/.maestro/subflows/go-to-folder.yaml +++ b/.maestro/subflows/go-to-folder.yaml @@ -2,8 +2,8 @@ appId: org.bulwarkmail.mobile --- - runFlow: open-drawer.yaml -# A folder row reads " / ". -- tapOn: ${FOLDER}( .*)? +# A folder row's label joins its texts: ", , /, ". +- tapOn: ${FOLDER}([ ,].*)? - extendedWaitUntil: visible: ${FOLDER} timeout: 15000 diff --git a/scripts/e2e/failed-steps.mjs b/scripts/e2e/failed-steps.mjs index f4fdf605..ba300dca 100644 --- a/scripts/e2e/failed-steps.mjs +++ b/scripts/e2e/failed-steps.mjs @@ -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');