e2e-playwright
Executes E2E tests and visual snapshots for React/TypeScript projects.
Install
mkdir -p .claude/skills/e2e-playwright && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/15163" && unzip -o skill.zip -d .claude/skills/e2e-playwright && rm skill.zipInstalls to .claude/skills/e2e-playwright
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Tests end-to-end con Playwright para el frontend React. Ejecutar tests E2E, crear tests nuevos, generar capturas.Key capabilities
- →Run all E2E tests for the React frontend
- →Execute tests for a specific page (home, dashboard, catalog, etc.)
- →Generate screenshots for all pages
- →Create new E2E tests following a template
- →Verify that Docker containers are running and healthy
- →Debug tests using Playwright's UI mode
How it works
This skill provides commands to interact with Playwright for E2E testing, including running tests, generating screenshots, and managing the Docker Compose environment.
Inputs & outputs
When to use e2e-playwright
- →Run e2e tests
- →Update test snapshots
- →Debug frontend flows
About this skill
E2E Testing con Playwright
El usuario ha invocado /e2e con los argumentos: $ARGUMENTS
Actua como experto en Playwright para TypeScript/React. El proyecto usa un frontend React 18 + TypeScript + Vite corriendo en Docker Compose.
Acciones disponibles:
run— Ejecutar todos los tests E2Erun <page>— Ejecutar tests de una pagina (home, dashboard, catalog, operations, explorer, embeddings, chat)screenshots— Generar capturas de todas las paginasnew <page> <descripcion>— Crear un test E2E nuevostatus— Verificar que los containers estan running y healthyhelp— Mostrar esta ayuda
Prerequisitos
Los containers de backend + frontend + bases de datos DEBEN estar corriendo:
docker compose up --build -d
# Frontend: http://localhost:5173
# Backend: http://localhost:8000
Stack E2E
- Playwright for TypeScript (via
npx playwright) - Test location:
frontend/webapp/tests/e2e/ - Config:
frontend/webapp/playwright.config.ts
Comandos
# 1. Levantar servicios (si no estan)
docker compose up --build -d
# 2. Instalar Playwright (primera vez)
cd frontend/webapp && npx playwright install --with-deps chromium
# 3. Ejecutar todos los E2E
cd frontend/webapp && npx playwright test
# 4. Ejecutar tests de una pagina
cd frontend/webapp && npx playwright test tests/e2e/test_catalog.spec.ts
# 5. Ejecutar con UI mode (debug)
cd frontend/webapp && npx playwright test --ui
# 6. Generar capturas
cd frontend/webapp && npx playwright test --update-snapshots
Estructura
frontend/webapp/
tests/e2e/
home.spec.ts Home page
dashboard.spec.ts Dashboard: health, DB status, jobs
catalog.spec.ts Catalog: competitions, matches
operations.spec.ts Operations: download, load, process
explorer.spec.ts Explorer: teams, players, events
embeddings.spec.ts Embeddings: coverage, rebuild
chat.spec.ts Chat: RAG semantic search
playwright.config.ts Config: baseURL, timeouts, projects
Selectores preferidos
page.getByRole('button', { name: 'Download' }) // Por rol (mejor)
page.getByText('Total Matches') // Por texto
page.getByLabel('Source') // Por label
page.getByTestId('sidebar') // Por test-id
Plantilla para test nuevo
import { test, expect } from '@playwright/test';
test.describe('<Page> Page', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/<route>');
await page.waitForLoadState('networkidle');
});
test('loads without errors', async ({ page }) => {
await expect(page.getByRole('heading')).toBeVisible();
await expect(page.locator('text=Error')).toHaveCount(0);
});
test('main content visible', async ({ page }) => {
await expect(page.getByText('<expected text>')).toBeVisible();
});
});
Reglas
- NUNCA usar
page.waitForTimeout()— usarwaitForLoadStateowaitForSelector - SIEMPRE usar selectores semánticos (role, text, label) sobre CSS selectors
- Tests deben ser independientes — no depender del orden de ejecución
- Cada test debe limpiar su estado si modifica datos
- Capturas van en
frontend/webapp/tests/e2e/screenshots/
Comportamiento por accion
run
- Verificar containers healthy:
docker compose ps - Ejecutar:
cd frontend/webapp && npx playwright test
screenshots
- Verificar containers healthy
- Ejecutar tests con
--update-snapshots - Listar capturas generadas
new <page> <descripcion>
- Generar test siguiendo plantilla y convenciones del proyecto
- Ejecutar para verificar que pasa
status
docker compose ps— verificar servicioscurl http://localhost:8000/api/v1/health/live— backend healthcurl http://localhost:5173— frontend health
When not to use it
- →When the project does not use a React 18 + TypeScript + Vite frontend running in Docker Compose
- →When the tests are not E2E tests with Playwright for TypeScript
- →When the user does not need to manage Docker containers for the application stack
Limitations
- →Tests must be independent and not rely on execution order
- →Each test must clean its state if it modifies data
- →Screenshots are stored in `frontend/webapp/tests/e2e/screenshots/`
How it compares
This workflow integrates Playwright E2E testing with Docker Compose management, providing a unified interface for running, debugging, and creating tests within the project's specific environment, unlike manual execution of separate commands
Compared to similar skills
e2e-playwright side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| e2e-playwright (this skill) | 0 | 3mo | Review | Intermediate |
| ui-ux-expert-skill | 91 | 9mo | Review | Advanced |
| frontend-testing | 11 | 3mo | Review | Intermediate |
| feature-flags | 6 | 6mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
You might also like
ui-ux-expert-skill
fercracix33
Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.
frontend-testing
langgenius
Generate Vitest + React Testing Library tests for Dify frontend components, hooks, and utilities. Triggers on testing, spec files, coverage, Vitest, RTL, unit tests, integration tests, or write/review test requests.
feature-flags
Use when feature flag tests fail, flags need updating, understanding @gate pragmas, debugging channel-specific test failures, or adding new flags to React.
react-hook-form-writer
dust-tt
Write and refactor React forms using react-hook-form with Zod validation. Use when creating new form components, converting existing forms to react-hook-form, or implementing form validation patterns.
ui-testing
alinaqi
Visual testing - catch invisible buttons, broken layouts, contrast
react-skills
llama-farm
React 18 patterns for LlamaFarm Designer. Covers components, hooks, TanStack Query, and testing.