playwright-e2e-mcp 0.5.1 → 0.6.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.
Files changed (82) hide show
  1. package/README.md +55 -20
  2. package/dist/cli/ci.d.ts +5 -0
  3. package/dist/cli/ci.js +97 -5
  4. package/dist/cli/ci.js.map +1 -1
  5. package/dist/cli/doctor.d.ts +31 -0
  6. package/dist/cli/doctor.js +200 -0
  7. package/dist/cli/doctor.js.map +1 -0
  8. package/dist/cli/init.js +2 -1
  9. package/dist/cli/init.js.map +1 -1
  10. package/dist/cli/review.d.ts +50 -0
  11. package/dist/cli/review.js +148 -0
  12. package/dist/cli/review.js.map +1 -0
  13. package/dist/http.d.ts +14 -1
  14. package/dist/http.js +43 -8
  15. package/dist/http.js.map +1 -1
  16. package/dist/index.js +10 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/oauth.d.ts +10 -0
  19. package/dist/oauth.js +29 -1
  20. package/dist/oauth.js.map +1 -1
  21. package/dist/server.d.ts +2 -2
  22. package/dist/server.js +65 -5
  23. package/dist/server.js.map +1 -1
  24. package/dist/tools/audit-accessibility.d.ts +24 -0
  25. package/dist/tools/audit-accessibility.js +8 -1
  26. package/dist/tools/audit-accessibility.js.map +1 -1
  27. package/dist/tools/audit-performance.d.ts +24 -0
  28. package/dist/tools/audit-performance.js +14 -2
  29. package/dist/tools/audit-performance.js.map +1 -1
  30. package/dist/tools/audit-tests.d.ts +62 -0
  31. package/dist/tools/audit-tests.js +209 -0
  32. package/dist/tools/audit-tests.js.map +1 -0
  33. package/dist/tools/bisect-failure.d.ts +42 -0
  34. package/dist/tools/bisect-failure.js +291 -0
  35. package/dist/tools/bisect-failure.js.map +1 -0
  36. package/dist/tools/compare-visual-state.d.ts +24 -0
  37. package/dist/tools/diagnose-flaky.js +20 -3
  38. package/dist/tools/diagnose-flaky.js.map +1 -1
  39. package/dist/tools/generate-e2e-test.js +1 -1
  40. package/dist/tools/generate-e2e-test.js.map +1 -1
  41. package/dist/tools/get-failure.js +11 -2
  42. package/dist/tools/get-failure.js.map +1 -1
  43. package/dist/tools/get-run-status.js +4 -3
  44. package/dist/tools/get-run-status.js.map +1 -1
  45. package/dist/tools/inspect-page.d.ts +24 -0
  46. package/dist/tools/inspect-page.js +9 -5
  47. package/dist/tools/inspect-page.js.map +1 -1
  48. package/dist/tools/list-tests.js +5 -1
  49. package/dist/tools/list-tests.js.map +1 -1
  50. package/dist/tools/probe-script.js +87 -9
  51. package/dist/tools/probe-script.js.map +1 -1
  52. package/dist/tools/run-test.js +3 -2
  53. package/dist/tools/run-test.js.map +1 -1
  54. package/dist/tools/shared.d.ts +23 -1
  55. package/dist/tools/shared.js +91 -26
  56. package/dist/tools/shared.js.map +1 -1
  57. package/dist/tools/structured.d.ts +334 -0
  58. package/dist/tools/structured.js +176 -0
  59. package/dist/tools/structured.js.map +1 -0
  60. package/dist/tools/suggest-fix.js +15 -5
  61. package/dist/tools/suggest-fix.js.map +1 -1
  62. package/dist/tools/validate-selector.d.ts +27 -0
  63. package/dist/tools/validate-selector.js +28 -5
  64. package/dist/tools/validate-selector.js.map +1 -1
  65. package/dist/types/index.d.ts +1 -1
  66. package/dist/types/index.js.map +1 -1
  67. package/dist/utils/attempt-limiter.d.ts +31 -0
  68. package/dist/utils/attempt-limiter.js +58 -0
  69. package/dist/utils/attempt-limiter.js.map +1 -0
  70. package/dist/utils/bisect.d.ts +31 -0
  71. package/dist/utils/bisect.js +47 -0
  72. package/dist/utils/bisect.js.map +1 -0
  73. package/dist/utils/flake-rules.d.ts +46 -0
  74. package/dist/utils/flake-rules.js +327 -0
  75. package/dist/utils/flake-rules.js.map +1 -0
  76. package/dist/utils/locator-expr.d.ts +3 -1
  77. package/dist/utils/locator-expr.js +25 -7
  78. package/dist/utils/locator-expr.js.map +1 -1
  79. package/package.json +5 -4
  80. package/skill/playwright-e2e-mcp/SKILL.md +19 -2
  81. package/skill/playwright-e2e-mcp/references/setup.md +2 -2
  82. package/skill/playwright-e2e-mcp/references/tools.md +34 -1
@@ -68,7 +68,8 @@ becomes the last run for `get-failure`, `suggest-fix` and `diagnose-flaky`.
68
68
  | `view` | `elements` \| `locators` \| `aria` | `locators`: compact map of interactive elements with verified locators; `aria` (0.5.0+): accessibility snapshot of the page or of `selector`, with a `toMatchAriaSnapshot` assertion |
69
69
  | `storageState` | string | Playwright storageState JSON inside the project (signed-in session); defaults to `PW_MCP_STORAGE_STATE` |
70
70
  | `headers` | object | Extra HTTP headers |
71
- | `actions` | array | Up to 20 steps after load: `{ type: click\|dblclick\|fill\|press\|check\|uncheck\|select\|hover\|wait\|goto, locator?, value?, url?, ms? }` |
71
+ | `actions` | array | Up to 20 steps after load: `{ type: click\|dblclick\|fill\|press\|check\|uncheck\|select\|hover\|wait\|goto, locator?, value?, url?, ms? }`. Locators may start with `frameLocator('#frame')` or use `.contentFrame()` for iframes (0.6.1+) |
72
+ | `actionTimeoutMs` | number | How long each action waits for its element (0.6.1+, default 10000) |
72
73
  | `routes` | array | Up to 20 network mocks before load, first match wins: `{ url (glob), method?, status?, json? \| body?, contentType?, headers?, abort?, delayMs? }` (0.5.0+). The result reports hits per mock |
73
74
  | `har` | object | `{ path, mode?: replay\|record, url?, notFound?: abort\|fallback }` (0.5.0+): replay requests from a HAR inside the project, or record the traffic to one. `routes` still win |
74
75
  | `browser` | `chromium` \| `firefox` \| `webkit` | Engine (0.5.0+, default chromium); must be installed |
@@ -245,3 +246,35 @@ Reads `.playwright-e2e-mcp/history.jsonl`, written by every run
245
246
  passing runs and flags ones that got slower; `trend` shows failed and flaky
246
247
  executions per day; `commits` names, per failing or flaky test, the first bad
247
248
  commit after its last passing streak and the last good one.
249
+
250
+ ## audit-tests (0.6.0+)
251
+
252
+ | Argument | Type | Notes |
253
+ | --- | --- | --- |
254
+ | `testDir` / `filter` | string | Narrow the files |
255
+ | `minSeverity` | `low` \| `medium` \| `high` | Default `low` |
256
+ | `historyRuns` | number | Default 50 |
257
+ | `limit` | number | Findings listed, default 50 |
258
+ | `fix` | boolean | Rewrite mechanical findings, re-run touched files, revert on failure |
259
+ | `verify` | boolean | Default true |
260
+
261
+ Rules: `hard-wait`, `sleep`, `non-retrying-assertion`, `missing-await`,
262
+ `focused-test` (high); `force-action`, `networkidle`, `element-handle`,
263
+ `fragile-selector`, `no-timeout` (medium); `hardcoded-url`, `serial-mode` (low).
264
+ Only `non-retrying-assertion`, `missing-await` and `focused-test` are fixed
265
+ mechanically. Files rank by findings weighted by their flaky rate in the history.
266
+
267
+ ## bisect-failure (0.6.0+)
268
+
269
+ | Argument | Type | Notes |
270
+ | --- | --- | --- |
271
+ | `test` | string | Spec file (required) |
272
+ | `grep` | string | Test title; better than `:line` across commits |
273
+ | `good` / `bad` | string | Commits or refs; `good` defaults to the newest passing commit in the history, `bad` to HEAD |
274
+ | `repeat` | number | Runs per commit (1–10) for intermittent failures |
275
+ | `maxSteps` | number | Default 12 |
276
+ | `stepTimeoutMs` | number | Default 180000 |
277
+
278
+ Runs in a temporary git worktree with the current `node_modules` linked in;
279
+ untestable commits are skipped. `status` is `found`, `ambiguous`, `max-steps`,
280
+ `not-failing` (passes at bad) or `good-fails`.