End-to-end testing skill. Activates for browser-based E2E tests, cross-browser testing, flaky test fixes, or page object models. Supports Playwright, Cypress, Selenium. Triggers on: /godmode:e2e, "E2E test", "browser test", "Playwright test", "Cypress test".
From godmodenpx claudepluginhub arbazkhan971/godmodeThis skill uses the workspace's default tool permissions.
Designs and optimizes AI agent action spaces, tool definitions, observation formats, error recovery, and context for higher task completion rates.
Enables AI agents to execute x402 payments with per-task budgets, spending controls, and non-custodial wallets via MCP tools. Use when agents pay for APIs, services, or other agents.
Compares coding agents like Claude Code and Aider on custom YAML-defined codebase tasks using git worktrees, measuring pass rate, cost, time, and consistency.
/godmode:e2e# Find existing E2E tests
find . -name "*.e2e.*" -o -name "*.spec.*" \
| grep -i -E "e2e|playwright|cypress" \
| grep -v node_modules
# Check for test framework config
ls playwright.config.* cypress.config.* wdio.conf.* \
2>/dev/null
# Count existing test files
find e2e/ tests/ -name "*.spec.ts" 2>/dev/null | wc -l
E2E TEST STATE:
Framework: <Playwright | Cypress | Selenium | none>
Config file: <path or none>
Test count: <N>
Page objects: <N> (or none)
Flaky tests: <N known flaky | unknown>
IF test count == 0: scaffold from scratch
IF test count > 0 AND flaky > 3: prioritize remediation
IF framework == none: default to Playwright
e2e/
├── tests/ # By feature
│ ├── auth/
│ │ ├── login.spec.ts
│ │ └── registration.spec.ts
│ ├── checkout/
│ │ ├── cart.spec.ts
│ │ └── payment.spec.ts
│ └── dashboard/
│ └── navigation.spec.ts
├── pages/ # Page Object Models
│ ├── base.page.ts
│ ├── login.page.ts
│ └── dashboard.page.ts
└── fixtures/
└── test-data.ts
All locators live in page objects. Tests call methods only.
Simulate real user journeys (login, add to cart, checkout), not individual page checks.
FLAKINESS DIAGNOSIS:
| Symptom | Fix |
|----------------------|------------------------------|
| Element not found | Use auto-waiting locators |
| Timeout on nav | waitForLoadState, bump limit |
| Stale element ref | Re-query after action |
| Test order deps | Isolate data in beforeEach |
ANTI-FLAKINESS RULES:
- Never use fixed sleep — use auto-waiting assertions
- Never depend on execution order — independent tests
- Never use CSS selectors — use data-testid, roles
- Always seed test data via API, not through the UI
- Always retry failed tests in CI (investigate repeats)
- Always record traces/screenshots on failure
THRESHOLDS:
Pass rate target: 100% over 10 consecutive runs
Max flaky tolerance: 0 (zero flaky tests in suite)
Retry budget in CI: 2 retries per test max
BROWSER MATRIX:
| Browser | Engine | Status |
|---------------|----------|------------|
| Chrome | Chromium | <PASS/FAIL>|
| Firefox | Gecko | <PASS/FAIL>|
| Safari | WebKit | <PASS/FAIL>|
| Mobile Chrome | Chromium | <PASS/FAIL>|
| Mobile Safari | WebKit | <PASS/FAIL>|
E2E REPORT — <project>
Framework: <Playwright | Cypress>
Total: <N> tests, Passing: <N>, Failing: <N>
Duration: <X>s (parallel: <N> workers)
Cross-browser: chromium PASS, firefox PASS, webkit PASS
Commit: "e2e: <project> — <N> tests across <N> flows"
# Run end-to-end tests
npx playwright test --reporter=list
npx cypress run --browser chrome
Never ask to continue. Loop autonomously until done.
sleep().sleep() or waitForTimeout().After EACH test spec or flakiness fix:
1. MEASURE: Run 10 times — pass rate?
2. DECIDE:
KEEP if: 100% pass rate AND no timing waits
DISCARD if: <100% OR uses sleep/waitForTimeout
3. COMMIT kept. Delete discarded before adding more.
test_flow_queue = detect_untested_user_flows()
WHILE test_flow_queue is not empty:
batch = test_flow_queue.take(3)
FOR each flow in batch:
1. Create Page Objects for the flow
2. Write spec: happy + error + edge cases
3. Run across browser matrix
4. IF flaky: diagnose, apply fix
5. IF pass rate < 100%: discard and rewrite
IF queue empty: run full suite, generate report
1. Check for: playwright.config.*, cypress.config.*
2. Scan for: *.e2e.*, *.spec.* in e2e/ or tests/
3. Detect frontend: Next.js, React, Vue, Angular
4. Check for page objects: e2e/pages/
5. Detect app URL from config or package.json
Print: E2E: {tests} tests, {flows} flows, {browsers} browsers. Pass: {rate}%. Flaky: {count}. Verdict: {verdict}.
Log to .godmode/e2e-results.tsv:
iteration flow browser tests_passing flaky status
STOP when ANY of:
- All critical flows covered at 100% pass rate
- Cross-browser matrix passes (chromium, firefox, webkit)
- User requests stop
- Max 10 iterations reached
npx playwright install.--repeat-each=10, fix root cause.