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,29 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
|
||||
test('dashboard carga cards de resumen', 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 expect(page.locator('.card')).toHaveCount(4);
|
||||
});
|
||||
|
||||
test('timeout de inactividad 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.clock.install();
|
||||
await page.clock.fastForward(1800001);
|
||||
await expect(page).toHaveURL(/\/login/);
|
||||
});
|
||||
|
||||
test('reportes ventas carga datos', 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('/reportes/ventas');
|
||||
await page.click('button:has-text("Generar")');
|
||||
await expect(page.locator('table')).toBeVisible();
|
||||
});
|
||||
Reference in New Issue
Block a user