mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-03 08:06:59 +00:00
test: list each failed step of an ios flow with its error from maestro 2's command log
This commit is contained in:
@@ -43,14 +43,16 @@ function findHierarchy(obj, seen = new Set()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (const file of walkFiles(root).filter((f) => /commands-.*\.json$/.test(f))) {
|
||||
// Maestro 1 writes commands-<flow>.json, Maestro 2 <flow>/commands.json.
|
||||
for (const file of walkFiles(root).filter((f) => /(^|[\\/])commands(-[^\\/]*)?\.json$/.test(f))) {
|
||||
let data;
|
||||
try {
|
||||
data = JSON.parse(fs.readFileSync(file, 'utf8'));
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
out.push(`== ${path.basename(file)}`);
|
||||
const base = path.basename(file);
|
||||
out.push(`== ${base === 'commands.json' ? `${path.basename(path.dirname(file))} / ${base}` : base}`);
|
||||
for (const entry of Array.isArray(data) ? data : []) {
|
||||
const command = entry.command || {};
|
||||
const type = Object.keys(command).find((k) => command[k]) || '?';
|
||||
|
||||
Reference in New Issue
Block a user