@ia-qa/self-healing 1.7.4 → 1.7.5

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.
Files changed (2) hide show
  1. package/README.md +20 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -19,8 +19,11 @@ deterministic: no model decides whether your build passes.
19
19
  [![ia-qa-heal repairing a broken Playwright suite: 3 failed, FIX verdict, selectors rewritten to getByRole, 3 passed, verified](https://www.ia-qa.com/media/heal-demo.gif)](https://www.ia-qa.com/media/heal-demo.mp4)
20
20
 
21
21
  `ia-qa-heal run` runs your suite, watches it break, diffs the live app against your baseline,
22
- rewrites the dead selectors as `getByRole(…, { exact: true })` not as fresher CSS paths —
23
- then **re-runs the suite to verify** and exits on that verdict. Nothing is committed.
22
+ rewrites the dead selectors, then **re-runs the suite to verify** and exits on that verdict.
23
+ Nothing is committed. By default a selector is replaced by the element's new selector, in the
24
+ style your suite already uses — CSS stays CSS. The demo adds `--locators`, which rewrites to
25
+ `getByRole(…, { exact: true })` where that is provably safe: a locator immune to the *next*
26
+ layout change.
24
27
 
25
28
  ▶ **[The full 49-second version](https://www.ia-qa.com/media/heal-demo.mp4)** also covers what
26
29
  deterministic healing *refuses* to guess, the MCP server answering an agent, and the HTML
@@ -122,7 +125,21 @@ What `fix` **refuses** is the point of the tool:
122
125
  | `unattributable` | `getByText`, `cy.contains`, `getByTitle`… name a **string, not an element**. Nothing proves the test meant the renamed button rather than a heading that never moved, so editing one would break a *passing* test |
123
126
 
124
127
  `--locators` rewrites to `getByRole(role, { name })` instead of a fresher CSS path, where that
125
- is provably safe — a selector that survives the next layout change.
128
+ is provably safe — a selector that survives the next layout change. Without it, a CSS selector
129
+ is replaced by a CSS selector: the tool does not impose a locator style on your suite.
130
+
131
+ ### At runtime, if you want it — `aiClick` / `aiFill`
132
+
133
+ ```ts
134
+ import { aiClick } from '@ia-qa/self-healing';
135
+ await aiClick(page, 'button#login');
136
+ ```
137
+
138
+ If the normal action times out, these read the page contract, re-scan the live page, retry on
139
+ the element that semantically matches, and log a loud warning that the test needs updating.
140
+ Useful to keep a suite green while you triage — but it is a **stopgap, not the loop**: healing
141
+ in memory hides the drift instead of putting it in a pull request. The verbs above edit your
142
+ files so a human reviews the change.
126
143
 
127
144
  ## Page Objects written in CSS
128
145
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ia-qa/self-healing",
3
- "version": "1.7.4",
3
+ "version": "1.7.5",
4
4
  "description": "Local-first self-healing for UI tests: a local MCP server + CLI that map your app's pages to a role/name/selector contract, diff selector drift (PASS/FIX/BLOCK), and apply deterministic fixes to Cypress/Playwright/Selenium tests. Runs on your machine — your app, your tests and your results never leave it.",
5
5
  "keywords": [
6
6
  "self-healing",