flow-walker-cli 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/command-schema.ts +1 -1
- package/src/run-schema.ts +1 -1
- package/src/runner.ts +5 -1
package/package.json
CHANGED
package/src/command-schema.ts
CHANGED
|
@@ -165,7 +165,7 @@ export const COMMAND_SCHEMAS: CommandSchema[] = [
|
|
|
165
165
|
},
|
|
166
166
|
];
|
|
167
167
|
|
|
168
|
-
export const SCHEMA_VERSION = '0.2.
|
|
168
|
+
export const SCHEMA_VERSION = '0.2.1';
|
|
169
169
|
|
|
170
170
|
/** Get schema for a specific command */
|
|
171
171
|
export function getCommandSchema(name: string): CommandSchema | undefined {
|
package/src/run-schema.ts
CHANGED
|
@@ -25,7 +25,7 @@ export interface StepResult {
|
|
|
25
25
|
interactive_count?: { min: number; actual: number };
|
|
26
26
|
bottom_nav_tabs?: { min: number; actual: number };
|
|
27
27
|
has_type?: { type: string; min: number; actual: number };
|
|
28
|
-
text_visible?: { expected: string[]; found: string[]; missing: string[] };
|
|
28
|
+
text_visible?: { expected: string[]; found: string[]; missing: string[]; warning?: string };
|
|
29
29
|
text_not_visible?: { expected_absent: string[]; absent: string[]; unexpected: string[] };
|
|
30
30
|
};
|
|
31
31
|
error?: string; // error message if failed
|
package/src/runner.ts
CHANGED
|
@@ -227,6 +227,7 @@ async function executeStep(
|
|
|
227
227
|
if (step.assert.text_visible || step.assert.text_not_visible) {
|
|
228
228
|
// Fetch all visible text from UIAutomator accessibility layer
|
|
229
229
|
const screenTexts = bridge.text();
|
|
230
|
+
const dumpEmpty = screenTexts.length === 0;
|
|
230
231
|
|
|
231
232
|
if (step.assert.text_visible) {
|
|
232
233
|
const missing: string[] = [];
|
|
@@ -241,7 +242,10 @@ async function executeStep(
|
|
|
241
242
|
status = 'fail';
|
|
242
243
|
}
|
|
243
244
|
}
|
|
244
|
-
assertion.text_visible = {
|
|
245
|
+
assertion.text_visible = {
|
|
246
|
+
expected: step.assert.text_visible, found, missing,
|
|
247
|
+
...(dumpEmpty ? { warning: 'UIAutomator dump returned empty (animated page?)' } : {}),
|
|
248
|
+
};
|
|
245
249
|
}
|
|
246
250
|
|
|
247
251
|
if (step.assert.text_not_visible) {
|