template-saas/orchestration/_archivo/planes/PLAN-SPRINT-3-E2E.md
rckrdmrd 50a821a415
Some checks failed
CI / Backend CI (push) Has been cancelled
CI / Frontend CI (push) Has been cancelled
CI / Security Scan (push) Has been cancelled
CI / CI Summary (push) Has been cancelled
[SIMCO-V38] feat: Actualizar a SIMCO v3.8.0
- HERENCIA-SIMCO.md actualizado con directivas v3.7 y v3.8
- Actualizaciones de configuracion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 08:53:08 -06:00

231 lines
5.2 KiB
Markdown

# PLAN SPRINT 3 - E2E Tests
**Proyecto:** template-saas
**Sprint:** 3
**Objetivo:** Implementar tests E2E con Playwright para flujos críticos
**Fecha Inicio:** 2026-01-10
**SP Total:** 8
---
## RESUMEN EJECUTIVO
### Estado Actual
- **Tests Unitarios:** 776 tests (76.37% cobertura)
- **Tests E2E:** 0% - No configurado
- **Flujos Críticos:** Sin cobertura E2E
### Gap a Cerrar
Implementar suite de tests E2E para validar flujos completos de usuario:
1. Autenticación (login, registro, OAuth)
2. Onboarding wizard completo
3. Billing (suscripción, cambio de plan)
4. Gestión de equipo (invitaciones)
5. Features principales (storage, notifications)
---
## TAREAS DEL SPRINT
### E2E-001: Setup Playwright
**Agente:** QA-Agent
**SP:** 2
**Dependencia:** Ninguna
#### Entregables
```yaml
entregables:
- apps/frontend/playwright.config.ts
- apps/frontend/tests/e2e/fixtures/auth.fixture.ts
- apps/frontend/tests/e2e/fixtures/tenant.fixture.ts
- apps/frontend/tests/e2e/utils/helpers.ts
- apps/frontend/package.json (actualizado con playwright)
```
#### Configuración Base
- Playwright con TypeScript
- Fixtures para autenticación
- Page Object Model setup
- CI/CD integration config
---
### E2E-002: Auth Flow Tests
**Agente:** QA-Agent
**SP:** 2
**Dependencia:** E2E-001
#### Entregables
```yaml
entregables:
- apps/frontend/tests/e2e/auth/login.spec.ts
- apps/frontend/tests/e2e/auth/register.spec.ts
- apps/frontend/tests/e2e/auth/forgot-password.spec.ts
- apps/frontend/tests/e2e/auth/oauth.spec.ts
```
#### Casos de Test
- Login exitoso con credenciales válidas
- Login fallido con credenciales inválidas
- Registro de nuevo usuario
- Flujo de recuperación de contraseña
- OAuth login (Google mock)
- Logout y limpieza de sesión
---
### E2E-003: Onboarding Flow Tests
**Agente:** QA-Agent
**SP:** 2
**Dependencia:** E2E-001
#### Entregables
```yaml
entregables:
- apps/frontend/tests/e2e/onboarding/wizard.spec.ts
- apps/frontend/tests/e2e/onboarding/company-step.spec.ts
- apps/frontend/tests/e2e/onboarding/invite-step.spec.ts
- apps/frontend/tests/e2e/onboarding/plan-step.spec.ts
```
#### Casos de Test
- Wizard completo de 4 pasos
- Navegación entre pasos
- Validación de campos obligatorios
- Skip de paso de invitaciones
- Selección de plan
- Completar onboarding
---
### E2E-004: Core Features Tests
**Agente:** QA-Agent
**SP:** 2
**Dependencia:** E2E-002
#### Entregables
```yaml
entregables:
- apps/frontend/tests/e2e/dashboard/dashboard.spec.ts
- apps/frontend/tests/e2e/billing/subscription.spec.ts
- apps/frontend/tests/e2e/team/invitations.spec.ts
- apps/frontend/tests/e2e/settings/profile.spec.ts
```
#### Casos de Test
- Dashboard carga correctamente
- Ver y cambiar suscripción
- Enviar invitación a equipo
- Actualizar perfil de usuario
- Ver notificaciones
- Gestión de archivos básica
---
## EJECUCIÓN DEL SPRINT
### Orden de Ejecución
```
E2E-001 (Setup)
├── E2E-002 (Auth) ──► Paralelo
└── E2E-003 (Onboarding) ──► Paralelo
└── E2E-004 (Core Features)
```
### Comandos de Validación
```bash
# Instalar Playwright
cd apps/frontend && npm install -D @playwright/test
# Instalar browsers
npx playwright install
# Ejecutar tests E2E
npm run test:e2e
# Ejecutar con UI
npm run test:e2e:ui
# Generar reporte
npm run test:e2e:report
```
### Métricas de Éxito
| Métrica | Objetivo |
|---------|----------|
| Tests E2E nuevos | 20-25 |
| Flujos cubiertos | 6 críticos |
| Tiempo ejecución | < 5 min |
| Pass rate | 100% |
---
## ESTRUCTURA DE ARCHIVOS
```
apps/frontend/
├── playwright.config.ts
├── tests/
│ └── e2e/
│ ├── fixtures/
│ │ ├── auth.fixture.ts
│ │ └── tenant.fixture.ts
│ ├── utils/
│ │ └── helpers.ts
│ ├── auth/
│ │ ├── login.spec.ts
│ │ ├── register.spec.ts
│ │ └── ...
│ ├── onboarding/
│ │ └── wizard.spec.ts
│ ├── dashboard/
│ │ └── dashboard.spec.ts
│ └── billing/
│ └── subscription.spec.ts
```
---
**Creado:** 2026-01-10
**Sprint:** 3 de 5
**Estado:** COMPLETADO
---
## REPORTE DE EJECUCIÓN
**Fecha Finalización:** 2026-01-10
### Archivos Creados
| Archivo | Descripción |
|---------|-------------|
| `playwright.config.ts` | Configuración Playwright |
| `tests/e2e/fixtures/auth.fixture.ts` | Fixtures de autenticación |
| `tests/e2e/fixtures/tenant.fixture.ts` | Fixtures de tenant |
| `tests/e2e/utils/helpers.ts` | Utilidades de test |
| `tests/e2e/auth/login.spec.ts` | Tests de login (10 tests) |
| `tests/e2e/auth/register.spec.ts` | Tests de registro (7 tests) |
| `tests/e2e/onboarding/wizard.spec.ts` | Tests de onboarding (10 tests) |
| `tests/e2e/dashboard/dashboard.spec.ts` | Tests de dashboard (10 tests) |
| `tests/e2e/billing/subscription.spec.ts` | Tests de billing (10 tests) |
### Métricas
| Métrica | Resultado |
|---------|-----------|
| Tests E2E creados | 47 |
| Archivos de test | 5 |
| Fixtures | 2 |
| Flujos cubiertos | 5 (auth, register, onboarding, dashboard, billing) |