E2e testing playwright review
Skill Raishin/vanguard-frontier-agentic/skills/frontend/e2e-testing-playwright-review
Reviews Playwright end-to-end test configuration -- fixtures, storageState/auth setup, CI sharding and parallelism, and toHaveScreenshot visual-assertion options -- for reliability and correct gating, grounded in current, version-specific Playwright API docs.From its SKILL.md
npx -y skills add Raishin/vanguard-frontier-agentic --skill e2e-testing-playwright-reviewAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 20 stars20 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.9 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it
E2E Testing (Playwright) Review
Purpose
Playwright E2E suites fail in two directions: they're flaky enough that teams disable them, or they're so under-configured (no sharding, no masking, no stable waits) that they're slow and noisy without adding confidence. This skill reviews Playwright-specific configuration -- fixtures, auth state, parallelism, and screenshot assertions -- against current official API behavior rather than remembered API shapes that may be stale across majors.
When to use
Use this skill when the user asks to:
- review or configure Playwright test fixtures,
storageState, or auth setup, - diagnose Playwright test flakiness (timing, animation, non-deterministic content),
- configure CI sharding/parallelism for a Playwright suite,
- review or tune
toHaveScreenshotvisual-assertion options (maxDiffPixelRatio,mask,animations).
Context7 Documentation Protocol
Playwright's config shape, CLI flags, and assertion option names change across majors and are documented, not folklore -- never assert a flag, option, or "best practice" from memory.
- Call
ToolSearchwith query"context7"(or"select:mcp__Context7__resolve-library-id,mcp__Context7__query-docs") to load the Context7 tools if not already loaded in this session. - Call
mcp__Context7__resolve-library-idwith library namePlaywrightto obtain the current Context7-compatible ID (/microsoft/playwright); prefer the resolved ID over guessing. - Call
mcp__Context7__query-docsfor the specific claim in question -- e.g. "toHaveScreenshot maxDiffPixelRatio and mask options", "shard CLI flag and blob reporter merge", "storageState project dependencies setup" -- before stating it as fact. Do this per review, not once from a prior session's memory. - Prefer the official docs URLs in
official_docsfor primary normative statements (exact CLI flags, exact config shape); use Context7 to ground and cross-check the claim before writing it into a finding. - If Context7 is unavailable or returns no relevant match, fall back to the
official_docsURLs and mark the claimdocumentation-based (Context7 unavailable)rather than presenting it as freshly verified. - Never invent a config key, CLI flag, assertion option, or fixture API that no queried source confirms.
Lean operating rules
- Always confirm the installed Playwright version before asserting on API option names;
toHaveScreenshotoptions and CLI--shardsyntax are stable but still verify against the project'spackage.jsonversion, not assumption. - Distinguish flakiness caused by real non-determinism (animation, dynamic content, network timing) from flakiness caused by weak locators or missing waits; the fix differs, and misdiagnosis just hides a real timing bug behind a wider tolerance.
- Recommend
animations: 'disabled'and explicitmask/stylePathfor non-deterministic regions before recommending a loosermaxDiffPixelRatio/maxDiffPixels/threshold-- widening tolerance first papers over the actual source of visual noise. - Treat
storageState.jsonfixtures as sensitive: they must come from a dedicated test account, never a real user session, and should not be committed if they contain live tokens (see security notes below). - Recommend CI sharding (
--shard=N/Mwith a matrix strategy plusblobreporter andmerge-reports) only after confirming the suite's actual wall-clock time in CI justifies the added job complexity and report-merge step; sharding without a merge step silently drops report coverage. - Prefer the setup-project/
dependenciespattern (a dedicatedsetupproject producingstorageState, consumed viadependencies: ['setup']) over ad hocglobalSetupfor auth when the project already uses Playwright's project model; both are documented, but they compose differently with sharding and per-project storage state. - Do not conflate
fullyParallel(parallelizes tests within a single file, in addition to across files) with CI-level sharding (--shard, distributes files across separate CI jobs/machines) -- they solve different bottlenecks and a suite can need one, both, or neither. - Load the design-token/visual-regression skill instead of this one when the question is about baseline-approval workflow or a third-party visual-review service (e.g. Chromatic), not Playwright's own
toHaveScreenshotconfig.
References
Load these only when needed:
- Fixtures, auth setup, and storageState security -- use when reviewing or designing
storageState/auth fixtures,setupproject dependencies,globalSetup, or handling ofstorageState.json/HAR files as sensitive artifacts. - CI sharding and parallelism -- use when configuring or reviewing
--shard, matrix CI strategy, blob-reporter merge,fullyParallel, orworkerstuning. - Visual assertion tuning (toHaveScreenshot) -- use when reviewing or tuning
toHaveScreenshot/toMatchSnapshotoptions (animations,mask,maxDiffPixelRatio,maxDiffPixels,threshold,stylePath) or diagnosing visual-diff flakiness.
Response minimum
Return, at minimum:
- the Playwright feature/config area in scope (fixtures, sharding, screenshot assertion),
- evidence level and the exact Playwright version the guidance targets,
- root cause of any flakiness identified (not just a threshold-widening patch),
- proposed config diff (not applied) with the option names verified against docs,
- security caveat on any
storageState/HAR fixture reviewed.
What ships with it: 4 files
14.4 KB alongside SKILL.md
references/
- metadata.json1.3 KB