tamash-playwright 0.12.0-beta.2 → 0.12.0

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/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project are documented here. Format loosely follows
4
4
  [Keep a Changelog](https://keepachangelog.com/); dates are when each version was published.
5
5
 
6
- ## [0.12.0-beta.2] - 2026-09-08
6
+ ## [0.12.0] - 2026-09-13
7
7
 
8
8
  ### Added
9
9
 
@@ -29,6 +29,13 @@ All notable changes to this project are documented here. Format loosely follows
29
29
  be persisted — it fell back to a transient one-shot element reference with a `needsReview`
30
30
  note. Fixed here.)*
31
31
 
32
+ - **Documented [`tamash-playwright-dashboard`](https://www.npmjs.com/package/tamash-playwright-dashboard).**
33
+ A separate, zero-config reporter package: pass-rate trends, per-test history across runs, and —
34
+ specific to this package — a Self-Healing Analytics page (tests/elements healed, token usage
35
+ per run and cumulatively, every heal event across recorded history), read directly from the
36
+ `self-healing-<action>` JSON attachment this package already writes. No code change on this
37
+ side — README and usage.md gained a "Trends across runs" section pointing to it.
38
+
32
39
  ### Fixed
33
40
 
34
41
  - **`describeFactoryCall` rendered `iframe "undefined"` for a no-arg `frameLocator()`.** The
package/README.md CHANGED
@@ -565,6 +565,26 @@ The same detail is also printed to the console as it happens, one line per attem
565
565
  [self-healer] src/pages/loginpage.ts:11 — locator.fill "Username Textbox" -> HEALED [provider=ollama:gpt-oss:120b, vision=no, actionRecovery=no, suggested="getByRole(\"textbox\", { name: \"Username\" })", 620 tokens (489 input + 131 output)] — locator.fill: Timeout 8000ms exceeded.
566
566
  ```
567
567
 
568
+ ## Trends across runs: `tamash-playwright-dashboard`
569
+
570
+ The per-run detail above is everything Playwright's own HTML report gives you — great for one run, but it doesn't track history. [`tamash-playwright-dashboard`](https://www.npmjs.com/package/tamash-playwright-dashboard) is a separate, zero-config reporter package that does: pass-rate trends, per-test history across runs, a Test Health view (newly failed/fixed, still failing, flaky), and — specific to this package — a **Self-Healing Analytics** page: tests/elements healed, token usage per run and cumulatively, and every heal event across your recorded history. A single self-contained `index.html`, no server, safe to open via `file://`.
571
+
572
+ ```sh
573
+ npm install -D tamash-playwright-dashboard
574
+ ```
575
+
576
+ ```ts
577
+ // playwright.config.ts
578
+ export default defineConfig({
579
+ reporter: [
580
+ ['list'],
581
+ ['tamash-playwright-dashboard'],
582
+ ],
583
+ });
584
+ ```
585
+
586
+ It reads this package's heal reports straight off the test result — the same JSON attachment described above — with nothing to configure: install both packages and the Self-Healing tab appears on its own. [Live sample report](https://qtpsudhakarproducts.github.io/tamash-playwright-dashboard/) (synthetic demo data) · [live from this repo's own sample project](https://qtpsudhakarproducts.github.io/tamash-playwright-typescript-playwright/dashboard/index.html) (real heals from CI, growing every run) · [full docs](https://www.npmjs.com/package/tamash-playwright-dashboard).
587
+
568
588
  ## Using this with an AI coding assistant
569
589
 
570
590
  This package ships a ready-made skill for running its local workflow inside an AI coding assistant — reviewing, applying, verifying, and landing whatever healed at runtime, and onboarding a project to its standards (provider setup, `actionTimeout`, `.describe()` labels) if it hasn't adopted them yet. It's pure orchestration over the exact CLI commands already documented above (`doctor`, `apply-heals`, `verify-heals.cjs`) — no new capability, just packaged so an agent can run the whole loop with judgment instead of you typing each command by hand.
@@ -122,6 +122,52 @@ healing-disabled verification.
122
122
  regression set above instead); `healing-disabled.e2e` (needs `HEALER_ENABLED=false`, unchanged by
123
123
  this work); CI sample-repo runs (no iframe case there).
124
124
 
125
+ **Docs-only addition (2026-09-13, no code change)**: documented the companion
126
+ [`tamash-playwright-dashboard`](https://www.npmjs.com/package/tamash-playwright-dashboard) package
127
+ (README, usage.md, and the support repo's `reports.md`/`typescript.md`/top-level README) — a
128
+ separate reporter that reads this package's own `self-healing-<action>` attachment with zero
129
+ config. Verified in the sample repo (`test/beta-0.12.0-ci`): wired `['tamash-playwright-dashboard']`
130
+ into the reporter list, ran the suite, and confirmed `playwright-dashboard/history.json`'s per-run
131
+ summary (`healAttempts`, `healSucceeded`, `healedTestsCount`, `healedElementsCount`, `healTokens`,
132
+ `healNeedsReviewCount`) populated correctly from `pomtest`'s real heal, and `index.html` renders
133
+ the Self-Healing Analytics/Activity views. *(Unrelated finding, not touched at the time: the sample
134
+ repo's `popupnewtabtest`'s target link — orangehrm.com's real footer no longer has an
135
+ "OrangeHRM, Inc" link, so the test failed on its own; a live-site content change, not a regression
136
+ from this or the 1.63 work — since fixed, see below.)*
137
+
138
+ **Follow-up (2026-09-13)**: extended the sample-repo work into a real, live GitHub Pages
139
+ deployment and fixed the site-drift failure above.
140
+
141
+ - **`resolveFrameScope` durability fix, from the published tarball**: the beta.1 CI run
142
+ (`test-tamash` + `apply-heals` verification) failed on the transient no-arg-frameLocator heal
143
+ described above. Root-caused via a focused reproduction: `Locator.normalize()` on a raw
144
+ `page.frames()[i]` `Frame`-rooted locator returns a correct selector *string*
145
+ (`locator('#f').contentFrame().getByLabel(...)`) but an *object* that resolves to nothing.
146
+ `resolveFrameScope` now returns `page.frameLocator('iframe, frame')` (a `FrameLocator`) instead —
147
+ confirmed live both from source (`iframe-noarg-framelocator-repro.spec.ts`'s single-frame test
148
+ now asserts the heal is durable, not transient) and from the **published `0.12.0-beta.2` tarball**
149
+ installed in the sample repo (temporary spec, removed after): heals to
150
+ `locator('[id="f"]').contentFrame().getByLabel('Country')`, no `ref:` fallback.
151
+ - **`popupnewtabtest` fixed**: the live login page's footer changed (the old "OrangeHRM, Inc" link
152
+ is gone). Retargeted to the current VibeTestQ footer link → vibetestq.com/contact's real (if
153
+ accessibility-unlinked) email field. Verified live: heals to `input[name="email"]` via
154
+ `normalize()`, full 5-test suite green.
155
+ - **Self-healing dashboard published to GitHub Pages, for real**: extended the sample repo's
156
+ existing `report-history`/Pages pipeline so `tamash-playwright-dashboard`'s `history.json`
157
+ persists and accumulates across CI runs (restored before each `test` job run, uploaded as an
158
+ artifact, copied into `_site/dashboard/` by `publish-report`, pushed back to `report-history`).
159
+ New "Self-healing dashboard" link on the composed report page. Also found and fixed a real
160
+ regression this introduced along the way: `reporter: [['html'], ['tamash-playwright-dashboard']]`
161
+ silently dropped ALL console output in CI (no `[self-healer]` lines, no pass/fail summary) — a
162
+ custom `reporter` array replaces Playwright's default entirely, so `'list'` had to be named
163
+ explicitly. Merged to `master` (PR #12) and verified live:
164
+ `qtpsudhakarproducts.github.io/tamash-playwright-typescript-playwright/` (200, has the new
165
+ section) and its `/dashboard/index.html` (200, real "Self-Healing Activity" content, not a
166
+ placeholder). CI on `master`: all 5 jobs green, including `publish-report`'s first real run
167
+ under this change.
168
+ - Both `tamash-playwright` and the support repo now link this real, live dashboard alongside the
169
+ dashboard package's own synthetic sample.
170
+
125
171
  ### [0.11.0-beta.6] — three more local-only subscription providers — 2026-08-29
126
172
 
127
173
  **Added this release**: `cursor-subscription`, `kiro-subscription`, `codex-subscription`. The user
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamash-playwright",
3
- "version": "0.12.0-beta.2",
3
+ "version": "0.12.0",
4
4
  "description": "Plug and Play Self-healing for Playwright and automatically recovers broken selectors using an AI model (Ollama, OpenAI, Anthropic, Gemini, or a Claude/GitHub Copilot subscription).",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/usage.md CHANGED
@@ -23,6 +23,7 @@ For a quicker, high-level overview see [README.md](README.md); this file is the
23
23
  - [Running `apply-heals` in CI](#running-apply-heals-in-ci)
24
24
  - [Publishing a healing dashboard to GitHub Pages](#publishing-a-healing-dashboard-to-github-pages)
25
25
  - [Reading reports](#reading-reports)
26
+ - [Trends across runs: `tamash-playwright-dashboard`](#trends-across-runs-tamash-playwright-dashboard)
26
27
  - [Environment variables](#environment-variables)
27
28
  - [CLI commands](#cli-commands)
28
29
 
@@ -453,6 +454,8 @@ jobs:
453
454
 
454
455
  ## Publishing a healing dashboard to GitHub Pages
455
456
 
457
+ This is a hand-rolled, CI-composed page — see [Trends across runs: `tamash-playwright-dashboard`](#trends-across-runs-tamash-playwright-dashboard) above for a ready-made reporter package that does per-run trend tracking with no workflow YAML at all. Use this section instead when you specifically want a public, no-checkout-required page hosted on GitHub Pages.
458
+
456
459
  A third job, run after `apply-heals`, can publish a single browsable page combining all three reports from a run — the initial execution (healing enabled), what got healed, and the post-fix verification (healing disabled) — no GitHub sign-in or artifact zip download required. Every past run stays browsable too, not just the latest.
457
460
 
458
461
  The key idea: a second branch (`report-history` here) that's pure storage — never configured as your repo's actual Pages source, which stays "deploy via GitHub Actions workflow" — checked out fresh each run, given this run's new snapshot under `history/<run-id>/`, and pushed back before the accumulated tree is deployed:
@@ -547,6 +550,32 @@ The same detail prints to the console as it happens:
547
550
  [self-healer] src/pages/loginpage.ts:11 — locator.fill "Username Textbox" -> HEALED [provider=ollama:gpt-oss:120b, vision=no, actionRecovery=no, suggested="getByRole(\"textbox\", { name: \"Username\" })", 620 tokens (489 input + 131 output)] — locator.fill: Timeout 8000ms exceeded.
548
551
  ```
549
552
 
553
+ ## Trends across runs: `tamash-playwright-dashboard`
554
+
555
+ Everything above is per-run — real detail, but Playwright's own HTML report doesn't remember yesterday's run when you open today's. [`tamash-playwright-dashboard`](https://www.npmjs.com/package/tamash-playwright-dashboard) is a separate reporter package (own install, own npm listing) built for exactly that gap: pass-rate trends, per-test history across runs, step-level detail with real locators and source locations, a Test Health view (Newly Failed, Newly Fixed, Still Failing with fail streaks, Flaky), and — because it recognizes this package's own heal reports — a dedicated **Self-Healing Analytics** page: tests/elements healed, token usage per run and cumulatively with a trend chart, and every heal event across your recorded history. Output is one self-contained `index.html` (data inlined as JSON) plus `history.json` — no server, no external JS/CSS/CDN, safe to open via `file://` or host anywhere; every list that can grow unbounded is paginated.
556
+
557
+ ```sh
558
+ npm install -D tamash-playwright-dashboard
559
+ ```
560
+
561
+ ```ts
562
+ // playwright.config.ts
563
+ export default defineConfig({
564
+ reporter: [
565
+ ['list'],
566
+ ['tamash-playwright-dashboard', {
567
+ outputDir: 'playwright-dashboard', // where history.json + index.html are written
568
+ maxHistory: 20, // how many past runs to keep
569
+ autoOpen: true, // opens in your browser after a local run (skipped when process.env.CI is set)
570
+ }],
571
+ ],
572
+ });
573
+ ```
574
+
575
+ Zero configuration needed for the self-healing side specifically: it reads this package's heal reports straight off the test result — the exact JSON attachment described above (`self-healing-<action>`) — so installing both packages is the whole integration; there's no shared config, no version coupling, nothing to wire by hand. Each `npx playwright test` run appends to the same `history.json`/`index.html`, building the trend view up over time. [Live sample report](https://qtpsudhakarproducts.github.io/tamash-playwright-dashboard/) (synthetic demo data) · [live from this repo's own sample project](https://qtpsudhakarproducts.github.io/tamash-playwright-typescript-playwright/dashboard/index.html) (real heals from CI, growing every run) · [full docs](https://www.npmjs.com/package/tamash-playwright-dashboard).
576
+
577
+ This is a local, per-checkout file — for a page your whole team can browse without checking out the repo, see [Publishing a healing dashboard to GitHub Pages](#publishing-a-healing-dashboard-to-github-pages) below, which is a different (CI-composed, hand-rolled) mechanism built before this package existed. The two are independent; use either, both, or neither.
578
+
550
579
  ## Environment variables
551
580
 
552
581
  | Variable | Default | Purpose |