openspec-playwright 0.1.29 → 0.1.30
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.
|
@@ -7,7 +7,7 @@ compatibility: Requires openspec CLI, Playwright (with browsers installed), and
|
|
|
7
7
|
**Architecture**: Uses CLI + SKILLs (not `init-agents`). This follows Playwright's recommended approach for coding agents — CLI is more token-efficient than loading MCP tool schemas into context. MCP is used only for Healer (UI inspection on failure).
|
|
8
8
|
metadata:
|
|
9
9
|
author: openspec-playwright
|
|
10
|
-
version: "2.
|
|
10
|
+
version: "2.5"
|
|
11
11
|
---
|
|
12
12
|
|
|
13
13
|
## Input
|
|
@@ -194,16 +194,23 @@ If tests fail → analyze failures, use **Playwright MCP tools** to inspect UI s
|
|
|
194
194
|
| `browser_run_code` | Execute custom fix logic (optional) |
|
|
195
195
|
|
|
196
196
|
**Healer workflow**:
|
|
197
|
-
1. Read the failing test
|
|
198
|
-
2.
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
**
|
|
205
|
-
|
|
206
|
-
|
|
197
|
+
1. Read the failing test → identify failure type by checking error message and console output
|
|
198
|
+
2. Classify the failure:
|
|
199
|
+
|
|
200
|
+
| Failure type | Signal | Action |
|
|
201
|
+
|-------------|--------|--------|
|
|
202
|
+
| **Network/backend** | `fetch failed`, `net::ERR`, 5xx, timeout | `browser_console_messages` → add `test.skip()` + report "backend error" |
|
|
203
|
+
| **Selector changed** | Element not found, page loaded | `browser_snapshot` → fix selector → re-run |
|
|
204
|
+
| **Assertion mismatch** | Element exists, wrong content/value | `browser_snapshot` → compare → fix assertion → re-run |
|
|
205
|
+
| **Timing issue** | `waitFor` timeout, race condition | Adjust wait strategy → re-run |
|
|
206
|
+
|
|
207
|
+
3. **Attempt heal** (up to 3 times):
|
|
208
|
+
- Apply fix using `browser_snapshot` (prefer `getByRole`, `getByLabel`, `getByText`)
|
|
209
|
+
- Re-run: `openspec-pw run <name> --project=<role>`
|
|
210
|
+
4. **After 3 failed attempts**:
|
|
211
|
+
- Use `browser_console_messages` + `browser_snapshot` to confirm root cause
|
|
212
|
+
- If app is clearly broken (e.g., API returns 500, element missing from flow) → add `test.skip()` + report "app bug — needs fix"
|
|
213
|
+
- If unclear → report with recommendation ("likely selector change, verify manually")
|
|
207
214
|
|
|
208
215
|
### 9. Report results
|
|
209
216
|
|
|
@@ -267,8 +274,10 @@ Read the report at `openspec/reports/playwright-e2e-<name>-<timestamp>.md`.
|
|
|
267
274
|
| test-plan.md exists | Read and use it — never regenerate |
|
|
268
275
|
| auth.setup.ts exists | Verify format — update only if stale |
|
|
269
276
|
| playwright.config.ts exists | Read and preserve all fields — add only missing |
|
|
270
|
-
| Test fails (
|
|
271
|
-
| Test fails (
|
|
277
|
+
| Test fails (network/backend) | Skip with `test.skip()` — backend/app error, not test fragility |
|
|
278
|
+
| Test fails (selector) | Healer: snapshot → fix selector → re-run (≤3 attempts) |
|
|
279
|
+
| Test fails (assertion) | Healer: snapshot → fix assertion → re-run (≤3 attempts) |
|
|
280
|
+
| 3 heal attempts failed | Confirm root cause → if app bug: `test.skip()` + report; if unclear: report with recommendation |
|
|
272
281
|
|
|
273
282
|
## Verification Heuristics
|
|
274
283
|
|
|
Binary file
|
package/package.json
CHANGED
package/release-notes.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
## What's Changed
|
|
2
2
|
|
|
3
|
-
- feat: add
|
|
3
|
+
- feat(skill): add explicit Healer failure classification (v2.5)
|
|
4
4
|
|
|
5
|
-
**Full Changelog**: https://github.com/wxhou/openspec-playwright/releases/tag/v0.1.
|
|
5
|
+
**Full Changelog**: https://github.com/wxhou/openspec-playwright/releases/tag/v0.1.30
|
|
Binary file
|