Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Add, repair, or review Playwright visual regression tests for browser-facing .NET apps, including screenshot baselines, Pixelmatch thresholds, deterministic rendering, and GitHub Actions artifacts. USE FOR: toHaveScreenshot, page.screenshot visual checks, Pixelmatch/pngjs comparison scripts, visual baseline updates, screenshot diff triage, or CI workflows for UI regression screenshots. DO NOT USE FOR: pure unit tests, accessibility audits, browser-debugging sessions, or frontend linting.
.claude/skills/managedcode-playwright-visual-testing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-08 | ✗→✓ | ▲ Improved | 7% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 61% | 0% |
webhintchrome-devtools-mcpbiome, eslint, stylelint, or htmlhintv1.62.1 fixes TypeScript configuration resolution regressions, accessibility snapshots that dropped names or image-style actionable elements, and branded primitive arguments passed to page.evaluate(). Re-run config discovery, accessibility snapshots, and TypeScript compile checks before accepting new visual baselines.--update-snapshots as an intentional local review action. Pull-request CI should retain expected, actual, diff, trace, and report artifacts instead of silently accepting a new baseline.mermaidflowchart TD A["Need visual regression coverage"] --> B{"Uses Playwright Test"} B -->|"Yes"| C["Prefer expect(page).toHaveScreenshot"] B -->|"No or custom compare needed"| D["Capture page.screenshot output"] D --> E["Compare with pixelmatch and pngjs"] C --> F["Stabilize viewport, data, animation, and volatile regions"] E --> F F --> G["Commit reviewed baselines"] G --> H["Run in CI and upload reports or image diffs"] H --> I["Triage expected, actual, and diff before changing thresholds"]
AGENTS.mdpackage.json, lockfile, Playwright config, test folders, and CI workflowsdotnet run, Aspire AppHost, static preview, or frontend dev serverexpect(page).toHaveScreenshot() when the repo can use Playwright Test snapshotspage.screenshot() plus a standalone Pixelmatch script only when the repo needs article-style central screenshots/baseline, screenshots/actual, and screenshots/diff folders, non-Playwright image inputs, or custom reporting outside Playwright Testnpx playwright test --update-snapshotsnpm ci, then npx playwright install --with-deps, then the focused Playwright commandnpx playwright test --only-changed=origin/$GITHUB_BASE_REF first on pull requests for faster feedback, but always follow it with the full suite because changed-test selection is heuristictest-results/, or upload screenshots/baseline, screenshots/actual, and screenshots/diff for a custom Pixelmatch flowmaxDiffPixels, maxDiffPixelRatio, or Pixelmatch mismatch thresholdsnpm cinpx playwright install --with-depsnpx playwright test or the repo's focused visual-test scriptnpx playwright test --update-snapshots only when accepting intentional baseline changesOther measured skills in the registry, with their headline benchmark lift.