@healflow/playwright 0.1.2 → 0.1.3
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/README.md +35 -18
- package/dist/index.d.ts +2 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -691
- package/dist/index.js.map +1 -1
- package/dist/plugin/classification.d.ts +6 -0
- package/dist/plugin/classification.d.ts.map +1 -0
- package/dist/plugin/classification.js +343 -0
- package/dist/plugin/classification.js.map +1 -0
- package/dist/plugin/constants.d.ts +5 -0
- package/dist/plugin/constants.d.ts.map +1 -0
- package/dist/plugin/constants.js +55 -0
- package/dist/plugin/constants.js.map +1 -0
- package/dist/plugin/heal-emit.d.ts +5 -0
- package/dist/plugin/heal-emit.d.ts.map +1 -0
- package/dist/plugin/heal-emit.js +69 -0
- package/dist/plugin/heal-emit.js.map +1 -0
- package/dist/plugin/index.d.ts +5 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +11 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/locator-wrap.d.ts +4 -0
- package/dist/plugin/locator-wrap.d.ts.map +1 -0
- package/dist/plugin/locator-wrap.js +68 -0
- package/dist/plugin/locator-wrap.js.map +1 -0
- package/dist/plugin/options.d.ts +3 -0
- package/dist/plugin/options.d.ts.map +1 -0
- package/dist/plugin/options.js +25 -0
- package/dist/plugin/options.js.map +1 -0
- package/dist/plugin/page-wrap.d.ts +9 -0
- package/dist/plugin/page-wrap.d.ts.map +1 -0
- package/dist/plugin/page-wrap.js +99 -0
- package/dist/plugin/page-wrap.js.map +1 -0
- package/dist/plugin/types.d.ts +19 -0
- package/dist/plugin/types.d.ts.map +1 -0
- package/dist/plugin/types.js +3 -0
- package/dist/plugin/types.js.map +1 -0
- package/dist/report-html/build.d.ts +7 -0
- package/dist/report-html/build.d.ts.map +1 -0
- package/dist/report-html/build.js +138 -0
- package/dist/report-html/build.js.map +1 -0
- package/dist/report-html/format.d.ts +6 -0
- package/dist/report-html/format.d.ts.map +1 -0
- package/dist/report-html/format.js +37 -0
- package/dist/report-html/format.js.map +1 -0
- package/dist/report-html/icons.d.ts +4 -0
- package/dist/report-html/icons.d.ts.map +1 -0
- package/dist/report-html/icons.js +7 -0
- package/dist/report-html/icons.js.map +1 -0
- package/dist/report-html/index.d.ts +3 -0
- package/dist/report-html/index.d.ts.map +1 -0
- package/dist/report-html/index.js +6 -0
- package/dist/report-html/index.js.map +1 -0
- package/dist/report-html/render.d.ts +6 -0
- package/dist/report-html/render.d.ts.map +1 -0
- package/dist/report-html/render.js +139 -0
- package/dist/report-html/render.js.map +1 -0
- package/dist/report-html/script.d.ts +2 -0
- package/dist/report-html/script.d.ts.map +1 -0
- package/dist/report-html/script.js +75 -0
- package/dist/report-html/script.js.map +1 -0
- package/dist/report-html/status.d.ts +2 -0
- package/dist/report-html/status.d.ts.map +1 -0
- package/dist/report-html/status.js +13 -0
- package/dist/report-html/status.js.map +1 -0
- package/dist/report-html/styles.d.ts +2 -0
- package/dist/report-html/styles.d.ts.map +1 -0
- package/dist/report-html/styles.js +441 -0
- package/dist/report-html/styles.js.map +1 -0
- package/dist/report-html/tree.d.ts +8 -0
- package/dist/report-html/tree.d.ts.map +1 -0
- package/dist/report-html/tree.js +57 -0
- package/dist/report-html/tree.js.map +1 -0
- package/dist/report-html/types.d.ts +19 -0
- package/dist/report-html/types.d.ts.map +1 -0
- package/dist/report-html/types.js +3 -0
- package/dist/report-html/types.js.map +1 -0
- package/dist/report-html.d.ts +2 -6
- package/dist/report-html.d.ts.map +1 -1
- package/dist/report-html.js +3 -859
- package/dist/report-html.js.map +1 -1
- package/dist/runtime-ladder.d.ts +17 -0
- package/dist/runtime-ladder.d.ts.map +1 -0
- package/dist/runtime-ladder.js +61 -0
- package/dist/runtime-ladder.js.map +1 -0
- package/dist/runtime-techniques/heal-helpers.d.ts +10 -0
- package/dist/runtime-techniques/heal-helpers.d.ts.map +1 -0
- package/dist/runtime-techniques/heal-helpers.js +304 -0
- package/dist/runtime-techniques/heal-helpers.js.map +1 -0
- package/dist/runtime-techniques/index.d.ts +11 -0
- package/dist/runtime-techniques/index.d.ts.map +1 -0
- package/dist/runtime-techniques/index.js +34 -0
- package/dist/runtime-techniques/index.js.map +1 -0
- package/dist/runtime-techniques/registry.d.ts +5 -0
- package/dist/runtime-techniques/registry.d.ts.map +1 -0
- package/dist/runtime-techniques/registry.js +29 -0
- package/dist/runtime-techniques/registry.js.map +1 -0
- package/dist/runtime-techniques/shared/constants.d.ts +4 -0
- package/dist/runtime-techniques/shared/constants.d.ts.map +1 -0
- package/dist/runtime-techniques/shared/constants.js +7 -0
- package/dist/runtime-techniques/shared/constants.js.map +1 -0
- package/dist/runtime-techniques/shared/error-utils.d.ts +9 -0
- package/dist/runtime-techniques/shared/error-utils.d.ts.map +1 -0
- package/dist/runtime-techniques/shared/error-utils.js +27 -0
- package/dist/runtime-techniques/shared/error-utils.js.map +1 -0
- package/dist/runtime-techniques/shared/heal-alternate.d.ts +6 -0
- package/dist/runtime-techniques/shared/heal-alternate.d.ts.map +1 -0
- package/dist/runtime-techniques/shared/heal-alternate.js +130 -0
- package/dist/runtime-techniques/shared/heal-alternate.js.map +1 -0
- package/dist/runtime-techniques/shared/heal-candidates.d.ts +11 -0
- package/dist/runtime-techniques/shared/heal-candidates.d.ts.map +1 -0
- package/dist/runtime-techniques/shared/heal-candidates.js +127 -0
- package/dist/runtime-techniques/shared/heal-candidates.js.map +1 -0
- package/dist/runtime-techniques/shared/heal-history.d.ts +10 -0
- package/dist/runtime-techniques/shared/heal-history.d.ts.map +1 -0
- package/dist/runtime-techniques/shared/heal-history.js +42 -0
- package/dist/runtime-techniques/shared/heal-history.js.map +1 -0
- package/dist/runtime-techniques/shared/locator-actions.d.ts +6 -0
- package/dist/runtime-techniques/shared/locator-actions.d.ts.map +1 -0
- package/dist/runtime-techniques/shared/locator-actions.js +66 -0
- package/dist/runtime-techniques/shared/locator-actions.js.map +1 -0
- package/dist/runtime-techniques/shared/page-waits.d.ts +6 -0
- package/dist/runtime-techniques/shared/page-waits.d.ts.map +1 -0
- package/dist/runtime-techniques/shared/page-waits.js +57 -0
- package/dist/runtime-techniques/shared/page-waits.js.map +1 -0
- package/dist/runtime-techniques/shared.d.ts +8 -0
- package/dist/runtime-techniques/shared.d.ts.map +1 -0
- package/dist/runtime-techniques/shared.js +24 -0
- package/dist/runtime-techniques/shared.js.map +1 -0
- package/dist/runtime-techniques/t0-retry.d.ts +4 -0
- package/dist/runtime-techniques/t0-retry.d.ts.map +1 -0
- package/dist/runtime-techniques/t0-retry.js +334 -0
- package/dist/runtime-techniques/t0-retry.js.map +1 -0
- package/dist/runtime-techniques/t1-scope.d.ts +4 -0
- package/dist/runtime-techniques/t1-scope.d.ts.map +1 -0
- package/dist/runtime-techniques/t1-scope.js +70 -0
- package/dist/runtime-techniques/t1-scope.js.map +1 -0
- package/dist/runtime-techniques/t2-normalize.d.ts +3 -0
- package/dist/runtime-techniques/t2-normalize.d.ts.map +1 -0
- package/dist/runtime-techniques/t2-normalize.js +12 -0
- package/dist/runtime-techniques/t2-normalize.js.map +1 -0
- package/dist/runtime-techniques/t3-fingerprint.d.ts +4 -0
- package/dist/runtime-techniques/t3-fingerprint.d.ts.map +1 -0
- package/dist/runtime-techniques/t3-fingerprint.js +13 -0
- package/dist/runtime-techniques/t3-fingerprint.js.map +1 -0
- package/dist/runtime-techniques/t4-trace.d.ts +4 -0
- package/dist/runtime-techniques/t4-trace.d.ts.map +1 -0
- package/dist/runtime-techniques/t4-trace.js +125 -0
- package/dist/runtime-techniques/t4-trace.js.map +1 -0
- package/dist/runtime-techniques/t5-history.d.ts +3 -0
- package/dist/runtime-techniques/t5-history.d.ts.map +1 -0
- package/dist/runtime-techniques/t5-history.js +50 -0
- package/dist/runtime-techniques/t5-history.js.map +1 -0
- package/dist/runtime-techniques/types.d.ts +36 -0
- package/dist/runtime-techniques/types.d.ts.map +1 -0
- package/dist/runtime-techniques/types.js +3 -0
- package/dist/runtime-techniques/types.js.map +1 -0
- package/dist/runtime-techniques.d.ts +2 -0
- package/dist/runtime-techniques.d.ts.map +1 -0
- package/dist/runtime-techniques.js +18 -0
- package/dist/runtime-techniques.js.map +1 -0
- package/dist/terminal.d.ts.map +1 -1
- package/dist/terminal.js +52 -3
- package/dist/terminal.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -60,12 +60,12 @@ export const test = base.extend(healflowFixture());
|
|
|
60
60
|
|
|
61
61
|
After each run, `.healflow/` contains:
|
|
62
62
|
|
|
63
|
-
| File
|
|
64
|
-
|
|
|
65
|
-
| `report.html` | Human-readable heal summary
|
|
66
|
-
| `heals.json`
|
|
67
|
-
| `fixes.json`
|
|
68
|
-
| `run.json`
|
|
63
|
+
| File | Purpose |
|
|
64
|
+
| ------------- | ------------------------------------ |
|
|
65
|
+
| `report.html` | Human-readable heal summary |
|
|
66
|
+
| `heals.json` | Runtime heals applied during the run |
|
|
67
|
+
| `fixes.json` | AST fix proposals (dry-run) |
|
|
68
|
+
| `run.json` | Full run metadata |
|
|
69
69
|
|
|
70
70
|
## Configuration
|
|
71
71
|
|
|
@@ -80,6 +80,14 @@ healing:
|
|
|
80
80
|
timing: true
|
|
81
81
|
overlay: true
|
|
82
82
|
iframe: true
|
|
83
|
+
shadowDom: true
|
|
84
|
+
auth: true
|
|
85
|
+
network: true
|
|
86
|
+
navigation: true
|
|
87
|
+
mobile: true
|
|
88
|
+
i18n: true
|
|
89
|
+
upload: true
|
|
90
|
+
multiTab: true
|
|
83
91
|
|
|
84
92
|
# Optional cloud sync
|
|
85
93
|
backend:
|
|
@@ -93,22 +101,31 @@ Environment variables: `HEALFLOW_API_URL`, `HEALFLOW_ORG_ID`, `HEALFLOW_REPO_ID`
|
|
|
93
101
|
|
|
94
102
|
## Exports
|
|
95
103
|
|
|
96
|
-
| Subpath
|
|
97
|
-
|
|
|
98
|
-
| `@healflow/playwright`
|
|
99
|
-
| `@healflow/playwright/auto`
|
|
100
|
-
| `@healflow/playwright/reporter`
|
|
101
|
-
| `@healflow/playwright/setup-global` | Global setup hook
|
|
104
|
+
| Subpath | Purpose |
|
|
105
|
+
| ----------------------------------- | --------------------------------------------- |
|
|
106
|
+
| `@healflow/playwright` | `healflowFixture`, `wrapPage`, plugin options |
|
|
107
|
+
| `@healflow/playwright/auto` | `withHealFlow()` config wrapper |
|
|
108
|
+
| `@healflow/playwright/reporter` | Custom Playwright reporter |
|
|
109
|
+
| `@healflow/playwright/setup-global` | Global setup hook |
|
|
102
110
|
|
|
103
111
|
## Runtime healing categories
|
|
104
112
|
|
|
105
|
-
|
|
106
|
-
- **Timing** — wait for element stability before retry
|
|
107
|
-
- **Overlay** — dismiss cookie banners and modals
|
|
108
|
-
- **Iframe / Shadow DOM** — context switching
|
|
109
|
-
- **Auth / Session** — storage-state refresh (when configured)
|
|
113
|
+
HealFlow walks the **T0→T5 runtime ladder** on every healable locator/page action:
|
|
110
114
|
|
|
111
|
-
|
|
115
|
+
| Technique | Purpose |
|
|
116
|
+
| -------------- | ---------------------------------------------------------------- |
|
|
117
|
+
| T0 Retry | Condition-based waits (visibility, network idle, spinner hidden) |
|
|
118
|
+
| T1 Scope | Parent-chain scoping |
|
|
119
|
+
| T2 Normalize | Role / label / text strategy migration |
|
|
120
|
+
| T3 Fingerprint | DOM attribute & aria similarity |
|
|
121
|
+
| T4 Trace | Frame/shadow/navigation hints from Playwright error context |
|
|
122
|
+
| T5 History | Reuse prior heals from `.healflow/heals.json` |
|
|
123
|
+
|
|
124
|
+
**Categories enabled by default:** selector, timing, overlay, iframe, shadow DOM, auth/session, network, navigation, mobile, i18n, upload, multi-tab.
|
|
125
|
+
|
|
126
|
+
Each runtime heal records `matrixEntryId`, `succeededTechnique`, and `healMode` in `.healflow/heals.json`.
|
|
127
|
+
|
|
128
|
+
Product bugs and assertion **values** are never auto-fixed.
|
|
112
129
|
|
|
113
130
|
## Cloud sync (optional)
|
|
114
131
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export interface HealFlowPluginOptions {
|
|
4
|
-
autoHeal?: boolean;
|
|
5
|
-
maxAttempts?: number;
|
|
6
|
-
apiUrl?: string;
|
|
7
|
-
organizationId?: string;
|
|
8
|
-
repositoryId?: string;
|
|
9
|
-
config?: HealFlowConfig;
|
|
10
|
-
}
|
|
11
|
-
export interface HealContext {
|
|
12
|
-
attempts: number;
|
|
13
|
-
healedActions: string[];
|
|
14
|
-
testFile?: string;
|
|
15
|
-
testTitle?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function wrapPage(page: Page, options?: HealFlowPluginOptions, healContext?: HealContext): Page;
|
|
18
|
-
export declare function healflowFixture(options?: HealFlowPluginOptions): {
|
|
19
|
-
page: ({ page }: {
|
|
20
|
-
page: Page;
|
|
21
|
-
}, use: (p: Page) => Promise<void>, testInfo: TestInfo) => Promise<void>;
|
|
22
|
-
};
|
|
1
|
+
export type { HealFlowPluginOptions, HealContext } from './plugin/index.js';
|
|
2
|
+
export { wrapPage, healflowFixture } from './plugin/index.js';
|
|
23
3
|
export { registerHealFlow } from './register.js';
|
|
24
4
|
export { withHealFlow, configToPluginOptions } from './auto.js';
|
|
25
5
|
export { healflowReporter } from './reporter.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC"}
|