feat: complete fases 3,4,5 - frontend, containers, e2e tests
FASE 3 - Frontend (22 paginas): - Leads (listado, detalle, nuevo), Cotizaciones, Arqueo - Cursos, Alumnos, Empresas (listado, detalle, ventas) - Reportes (ventas, ventas-empresas, reimpresion) - Autorizador, Contacto FASE 4 - Contenedores: - docker-compose.yml (backend-api + services-externos + frontend) - Dockerfiles para backend, services-externos, frontend - .env.example con secretos FASE 5 - Pruebas E2E: - Playwright config + 3 spec files (login, leads, dashboard) - 7 escenarios: login, error, sidebar, crear lead, dashboard cards, timeout, reportes
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test('listar leads carga tabla', async ({ page }) => {
|
||||
await page.goto('/login');
|
||||
await page.fill('[name="rut"]', '12345678-5');
|
||||
await page.fill('[name="clave"]', 'password');
|
||||
await page.click('button:has-text("Ingresar")');
|
||||
await page.goto('/leads');
|
||||
await expect(page.locator('table')).toBeVisible();
|
||||
});
|
||||
|
||||
test('crear lead desde formulario', async ({ page }) => {
|
||||
await page.goto('/login');
|
||||
await page.fill('[name="rut"]', '12345678-5');
|
||||
await page.fill('[name="clave"]', 'password');
|
||||
await page.click('button:has-text("Ingresar")');
|
||||
await page.goto('/leads/nuevo');
|
||||
await page.fill('input[placeholder*="Nombre"]', 'Test Lead');
|
||||
await page.click('button:has-text("Guardar")');
|
||||
await expect(page).toHaveURL(/\/leads$/);
|
||||
});
|
||||
|
||||
test('cerrar sesion redirige a login', async ({ page }) => {
|
||||
await page.goto('/login');
|
||||
await page.fill('[name="rut"]', '12345678-5');
|
||||
await page.fill('[name="clave"]', 'password');
|
||||
await page.click('button:has-text("Ingresar")');
|
||||
await page.click('button:has-text("Cerrar Sesión")');
|
||||
await expect(page).toHaveURL(/\/login/);
|
||||
});
|
||||
Reference in New Issue
Block a user