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(); });