LeandroBenjaminL/lend-ai / skills/frontend-e2e-testing
frontend-e2e-testing
UnverifiedTrigger: When user asks about E2E testing, Playwright, Cypress, or end-to-end test automation. Testing End-to-End de aplicaciones frontend. Pruebas de flujos completos multi-pagina con navegador real.
E2E Testing
Descripcion
Testing End-to-End de aplicaciones frontend. Pruebas de flujos completos multi-pagina con navegador real.
Tecnologías
- Playwright: Multi-browser (Chromium, Firefox, WebKit), mobile emulation, network intercept
- Cypress: Developer-friendly, time travel debugging, menos browsers
Por qué Playwright sobre Cypress
- Soporta 3 browsers (Chrome, Firefox, Safari)
- Mobile emulation real (no solo viewport)
- Network intercept más potente
- Más rápido en CI
- Mismo equipo que Puppeteer (Google → Microsoft)
Patrones clave
Test E2E básico
import { test, expect } from '@playwright/test';
test('user can login and see dashboard', async ({ page }) => {
await page.goto('/login');
await page.fill('[name="email"]', 'test@example.com');
await page.fill('[name="password"]', 'password123');
await page.click('button[type="submit"]');
await expect(page.locator('h1')).toHaveText('Dashboard');
});
Mock de API
await page.route('**/api/users', async (route) => {
await route.fulfill({ json: [{ id: 1, name: 'Test' }] });
});
LEND Workflow
1. ANALIZAR
Identificar flujos criticos que requieren E2E. Elegir herramienta (Playwright multi-browser vs Cypress developer-friendly). Revisar tests existentes.
2. OFRECER/DELEGAR
Decidir enfoque: E2E completo vs integracion. Determinar browsers objetivo y datos de prueba.
3. HACER
Escribir tests con data-testid, mocks de API, y parallel execution. Estructurar en flujos de usuario completos.
4. VERIFICAR
Correr en CI contra entorno controlado. Validar que flujos criticos pasan. Guardar patrones en Engram.
Consideraciones
- E2E tests son lentos — solo para flujos criticos
- Usa data-testid en lugar de clases CSS fragiles
- Corre en CI contra un entorno controlado
- Parallel execution para acelerar
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 318k | Updated | Claude CodeCodex | Unverified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |