UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

28 lines 1.36 kB
/** * @fileoverview Shared helpers for walking a `DonobuReport` and classifying * the tests inside it. Used by every renderer (HTML, Markdown, Slack) so they * all agree on "what counts as self-healed" and how suites nest. */ /** * Recursively collect all specs from a suite and its nested sub-suites. The * Playwright JSON report nests suites (e.g. describe blocks), so a flat view * is what every renderer actually wants. */ export declare function collectSpecs(suite: any): any[]; /** * A test is "self-healed" when either: * - it carries a `self-healed` annotation (set by the merge step when a * failing test flipped to passing on the heal rerun), or * - its `donobuStatus` field has been set to `'healed'` (same signal, via * the merged report's per-test metadata). */ export declare function isSelfHealed(test: any): boolean; /** Normalized test-status the renderers use for counts and labels. */ export type NormalizedStatus = 'passed' | 'failed' | 'healed' | 'timedOut' | 'skipped' | 'interrupted' | 'unknown'; /** * Derive the display status for a test. Prefers the final attempt's result * status; bumps to `'healed'` when the self-heal signal is present; falls * back to `'skipped'` when Playwright didn't emit a result. */ export declare function statusOf(test: any): NormalizedStatus; //# sourceMappingURL=reportWalk.d.ts.map