Files
rm-ventas/tests/e2e/dashboard.spec.ts
T
Nurfog 235f15e1e7 fix: audit 89 bugs - critical fixes
CRITICAL:
- JwtMiddleware orden (antes de UseAuthentication)
- JWT Secret en appsettings.json (no vacio)
- Transbank MySQL connection string (User=root + placeholder)
- package-lock generado + Dockerfile usa npm install
- Tests E2E: selectores corregidos con name attributes
- Tests: rut invalido reemplazado, casos sin auth
- Contacto page: apunta a services-externos (no backend)
- .env.example: credenciales reales -> placeholders

HIGH:
- extra_hosts agregado a services-externos en compose
- Dockerfile frontend: npm ci -> npm install
2026-07-08 11:30:16 -04:00

18 lines
583 B
TypeScript

import { test, expect } from '@playwright/test';
test('dashboard pagina carga', async ({ page }) => {
await page.goto('/dashboard');
await expect(page.locator('h2')).toContainText('Bienvenido');
});
test('pagina reportes ventas tiene selectores', async ({ page }) => {
await page.goto('/reportes/ventas');
await expect(page.locator('select')).toBeVisible();
await expect(page.locator('button:has-text("Generar")')).toBeVisible();
});
test('pagina inicio redirige', async ({ page }) => {
await page.goto('/');
await expect(page).toHaveURL(/\/login|\/dashboard/);
});