JPeetz/agent-skills / skills/qa-testing/playwright-e2e-testing
playwright-e2e-testing
VerifiedUse this skill when writing, debugging, or maintaining Playwright end-to-end tests in TypeScript, JavaScript, or Python. Covers test structure and architecture (Page Object Model, fixtures, custom matchers), locator strategy (role-based, test-ID, accessible selectors), auto-waiting and retry, API/network mocking, visual regression, component testing (React, Vue, Svelte), accessibility audits (axe-core), device emulation, authentication and session management (multi-profile, OAuth, 2FA), performance testing (Web Vitals, Lighthouse), CI/CD configuration (GitHub Actions, GitLab CI, sharding), flaky test detection and auto-healing, test data/fixtures, i18n testing, Electron and browser extension testing, security testing (XSS, CSRF, CSP), and WebSocket testing. Designed for agentic platforms β Claude Code, Codex, Cursor, Gemini CLI, OpenClaw, GitHub Copilot, Windsurf, OpenCode, and all SKILL.md-compatible agents.
| File | Kind | Size |
|---|---|---|
| CHANGELOG.md | markdown | 2.2 KB |
| LICENSE | other | 1.0 KB |
| SKILL.md | skill md | 23.4 KB |
| evals/evals.json | config | 5.3 KB |
| references/ci-cd-patterns.md | markdown | 2.5 KB |
| references/locator-strategies.md | markdown | 3.0 KB |
| references/testing-types-matrix.md | markdown | 3.2 KB |
| scripts/flake-detector.shexecutable | script | 2.0 KB |
| scripts/generate-auth-profile.ts | script | 3.4 KB |
| scripts/validate-playwright-setup.shexecutable | script | 2.2 KB |
scripts/validate-playwright-setup.sh
View on GitHub#!/bin/bash
# validate-playwright-setup.sh β Validates Playwright installation and browser availability
# Usage: ./validate-playwright-setup.sh [--ci]
set -euo pipefail
CI_MODE=false
if [[ "${1:-}" == "--ci" ]]; then
CI_MODE=true
fi
echo "π Validating Playwright setup..."
# Check Node.js
if ! command -v node &>/dev/null; then
echo "β Node.js is not installed. Install Node.js 18+ first."
exit 1
fi
NODE_VERSION=$(node -v | sed 's/v//' | cut -d. -f1)
if [ "$NODE_VERSION" -lt 18 ]; then
echo "β Node.js 18+ required. Found: $(node -v)"
exit 1
fi
echo "β
Node.js $(node -v)"
# Check Playwright package
if ! npx playwright --version &>/dev/null; then
echo "β οΈ Playwright not found. Install with: npm install -D @playwright/test"
exit 1
fi
echo "β
Playwright $(npx playwright --version)"
# Check browsers
BROWSERS=("chromium" "firefox" "webkit")
MISSING_BROWSERS=()
for browser in "${BROWSERS[@]}"; do
if [ "$CI_MODE" = true ] && [ "$browser" != "chromium" ]; then
continue # In CI, only chromium is commonly needed
fi
if ! npx playwright install --dry-run "$browser" 2>/dev/null | grep -q "already installed"; then
MISSING_BROWSERS+=("$browser")
fi
done
if [ ${#MISSING_BROWSERS[@]} -gt 0 ]; then
echo "β οΈ Missing browsers: ${MISSING_BROWSERS[*]}"
echo " Run: npx playwright install ${MISSING_BROWSERS[*]}"
echo " Or with deps: npx playwright install --with-deps ${MISSING_BROWSERS[*]}"
else
echo "β
All required browsers installed"
fi
# Check config file
if [ -f "playwright.config.ts" ] || [ -f "playwright.config.js" ]; then
echo "β
playwright.config found"
else
echo "β οΈ No playwright.config found in current directory"
fi
# Check test directory
if [ -d "e2e" ] || [ -d "tests" ] || [ -d "__tests__" ]; then
echo "β
Test directory found"
else
echo "β οΈ No e2e/ or tests/ directory found"
fi
if [ "$CI_MODE" = true ]; then
echo ""
echo "ποΈ CI mode: installing system dependencies..."
npx playwright install --with-deps chromium 2>/dev/null || \
echo "β οΈ Could not auto-install system deps. Ensure Docker image includes them."
fi
echo ""
echo "β
Playwright validation complete."
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 467k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 193k | Updated | Claude CodeCodex | Verified | Install |