Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Playwright-based end-to-end testing workflow.
.claude/skills/notque-e2e-testing/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-05 | ✗→✓ | ▲ Improved | 108% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 15% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 46% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 73% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 163% | 0% |
Playwright-based E2E testing across four phases: Scaffold, Build, Run, Validate. Each phase produces a saved artifact and must pass its gate before the next phase begins.
| Signal | Load These Files | Why | |---|---|---| | async, Promise.all, race condition, waitForTimeout, fixture teardown | async.md | Routes to the matching deep reference | | auth, login, storageState, OAuth, SSO, JWT, RBAC, multi-role, session expiry | auth.md | Routes to the matching deep reference | | config, playwright.config.ts, POM, data-testid, CI/CD workflow | templates.md | Routes to the matching deep reference | | error, timeout, tsc fail, locator, fill, missing JSON | errors.md | Routes to the matching deep reference | | POM examples, waiting, multi-browser, shared auth session | playwright-patterns.md | Routes to the matching deep reference | | Web3, MetaMask, wallet, addInitScript | wallet-testing.md | Routes to the matching deep reference | | payment, financial, production skip, blockchain | financial-flows.md | Routes to the matching deep reference | | flaky, intermittent, repeat-each, retries, quarantine | flakiness-triage.md | Routes to the matching deep reference |
Goal: Verify Playwright is installed, create the directory structure, and generate playwright.config.ts.
Actions:
@playwright/test is installed: npx playwright --version. If not, run npm install -D @playwright/test and npx playwright install. tests/ e2e/ auth/ features/ api/ pages/ <- POM classes live here artifacts/ screenshots/ traces/ videos/
playwright.config.ts using the template in references/templates.md. The config bakes in failure diagnostics by default: screenshot: 'only-on-failure', trace: 'on-first-retry', and video: 'retain-on-failure' so that every failure produces actionable artifacts without manual setup. CI retries (retries: process.env.CI ? 2 : 0) absorb transient infrastructure flakiness without masking real bugs.playwright.config.ts is valid TypeScript: npx tsc --noEmit. Run this deterministic check before any subjective assessment of the config -- compiler errors are facts, opinions are not.Artifact: playwright.config.ts + tests/e2e/ directory structure.
Gate: playwright.config.ts exists AND tests/e2e/ directory exists. If either is missing, do not proceed to Phase 2 -- diagnose and fix.
See references/templates.md for the full playwright.config.ts template and multi-browser matrix rationale.
Goal: Write POM classes for target feature areas, then write spec files that use those POMs.
Every page or feature area gets a typed Page Object class. Spec files never contain inline locators -- all selectors live in the POM. This separation means a selector change is a one-line POM edit, not a grep-and-replace across dozens of specs.
Actions:
pages/ (see POM Pattern in references/templates.md). All locators must use data-testid attributes via page.getByTestId(). CSS selectors (page.locator('.btn-primary')) break silently when styles change. XPath breaks on DOM restructuring. Text matching (page.locator('text=Submit')) breaks on copy changes. data-testid is a testing contract that survives all three.tests/e2e/<area>/ using the POMs.npx tsc --noEmit to verify all files compile.Artifact: tests/e2e/**/*.spec.ts files + pages/*.ts POM classes, all compiling cleanly.
Gate: At least one .spec.ts exists under tests/e2e/ AND npx tsc --noEmit exits 0. If compile fails, fix errors -- do not proceed to Phase 3 with broken TypeScript.
See references/templates.md for the POM Pattern, data-testid convention, and waiting/timing rules.
Goal: Execute the test suite, capture the results JSON, and identify any failing or flaky tests.
Actions:
BASE_URL required).playwright.config.ts:bash npx playwright test
--repeat-each=5 to distinguish flaky from consistently failing:bash npx playwright test tests/e2e/auth/login.spec.ts --repeat-each=5
test.fixme(). Never delete a failing test -- deleted tests leave silent coverage gaps. Quarantined tests are visible debt with tracking references:typescript test.fixme('flaky: login redirects intermittently', async ({ page }) => { // TODO: #123 -- investigate race condition with auth cookie ... });
test.skip() only for conditional environment guards (e.g., "skip on WebKit"), not for sweeping failures under the rug.Artifact: playwright-results.json (presence is the gate -- pass rate is not).
Gate: playwright-results.json exists at the project root. The file must contain valid JSON. Pass rate does not block Phase 4 -- reporting on failures is Phase 4's job.
See references/templates.md for the full Flaky Test Quarantine Protocol.
Goal: Deterministic checks on test output, then structured report generation.
Actions:
playwright-results.json exists and parses as valid JSON.python3 -c "import json,sys; d=json.load(open('playwright-results.json')); print(d.get('stats', d))"unexpected (failed) and flaky result entries.e2e-report.md using the report template in references/templates.md.Artifact: e2e-report.md.
Gate: e2e-report.md exists. Skill is complete only when this file is written.
See references/templates.md for the e2e-report.md template and the GitHub Actions CI/CD workflow template.
See references/errors.md for the symptom/cause/fix matrix covering tsc failures, CI-only flakes, missing results JSON, locator timeouts, fill-vs-clear bugs, and DOM ordering issues.
| Signal / Task Type | Load This Reference | |--------------------|---------------------| | async, Promise.all, race condition, waitForTimeout, fixture teardown | async.md | | auth, login, storageState, OAuth, SSO, JWT, RBAC, multi-role, session expiry | auth.md | | config, playwright.config.ts, POM, data-testid, CI/CD workflow | templates.md | | error, timeout, tsc fail, locator, fill, missing JSON | errors.md | | POM examples, waiting, multi-browser, shared auth session | playwright-patterns.md | | Web3, MetaMask, wallet, addInitScript | wallet-testing.md | | payment, financial, production skip, blockchain | financial-flows.md | | flaky, intermittent, repeat-each, retries, quarantine | flakiness-triage.md |
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-22 | pass→pass | 17,131 | 12,849 | -25% | 1 | 1 | 0% | 3,175 | 4,523 | +42% | 0 | 0 | — |
case-01 | fail→fail | 4,353 | 7,308 | +68% | 1 | 1 | 0% | 187 | 2,484 | +1228% | 0 | 0 | — |
case-02 | pass→fail | 19,712 | 8,012 | -59% | 1 | 1 | 0% | 3,592 | 2,724 | -24% | 0 | 0 | — |
case-03 | fail→fail | 12,579 | 7,349 | -42% | 1 | 1 | 0% | 2,600 | 2,517 | -3% | 0 | 0 | — |
case-04 | pass→pass | 17,151 | 8,432 | -51% | 1 | 1 | 0% | 2,706 | 3,589 | +33% | 0 | 0 | — |
case-05 | fail→pass | 12,498 | 13,167 | +5% | 1 | 1 | 0% | 2,021 | 4,210 | +108% | 0 | 0 | — |
case-06 | pass→pass | 5,949 | 3,904 | -34% | 1 | 1 | 0% | 951 | 2,789 | +193% | 0 | 0 | — |
case-19 | pass→pass | 8,597 | 2,521 | -71% | 1 | 1 | 0% | 1,475 | 2,533 | +72% | 0 | 0 | — |
case-07 | pass→pass | 11,401 | 5,937 | -48% | 1 | 1 | 0% | 1,984 | 3,170 | +60% | 0 | 0 | — |
case-08 | pass→pass | 13,849 | 8,263 | -40% | 1 | 1 | 0% | 2,021 | 3,423 | +69% | 0 | 0 | — |
case-09 | fail→fail | 4,965 | 4,080 | -18% | 1 | 1 | 0% | 717 | 2,823 | +294% | 0 | 0 | — |
case-10 | fail→pass | 15,415 | 3,895 | -75% | 1 | 1 | 0% | 2,452 | 2,811 | +15% | 0 | 0 | — |
case-11 | fail→pass | 11,825 | 4,432 | -63% | 1 | 1 | 0% | 2,019 | 2,956 | +46% | 0 | 0 | — |
case-12 | pass→pass | 15,504 | 6,221 | -60% | 1 | 1 | 0% | 2,428 | 3,218 | +33% | 0 | 0 | — |
case-13 | fail→pass | 9,244 | 2,892 | -69% | 1 | 1 | 0% | 1,492 | 2,576 | +73% | 0 | 0 | — |
case-14 | fail→pass | 6,206 | 2,623 | -58% | 1 | 1 | 0% | 968 | 2,541 | +163% | 0 | 0 | — |
case-20 | pass→pass | 15,405 | 19,914 | +29% | 1 | 1 | 0% | 3,156 | 6,615 | +110% | 0 | 0 | — |
case-15 | fail→pass | 7,825 | 3,031 | -61% | 1 | 1 | 0% | 1,350 | 2,713 | +101% | 0 | 0 | — |
case-16 | fail→pass | 6,851 | 1,835 | -73% | 1 | 1 | 0% | 1,250 | 2,361 | +89% | 0 | 0 | — |
case-17 | fail→pass | 10,631 | 2,674 | -75% | 1 | 1 | 0% | 1,763 | 2,457 | +39% | 0 | 0 | — |
case-18 | fail→pass | 13,054 | 1,892 | -86% | 1 | 1 | 0% | 1,938 | 2,390 | +23% | 0 | 0 | — |
case-21 | pass→pass | 12,664 | 12,539 | -1% | 1 | 1 | 0% | 2,610 | 4,518 | +73% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +36 percentage points is the difference between those two pass rates over the 19 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.