Files
Mdeical_Sur_Report/e2e/login.spec.ts
admin 750cf4129d Add audit log UI and backend API seeded E2E
- Add Auth Context route role guards so doctors cannot directly enter template management, user management, or audit logs.

- Add Audit Logs page, sidebar entry, frontend audit API client, and API client test.

- Add backend audit log query endpoint with super/admin visibility rules and query filtering.

- Extend PostgreSQL integration tests to cover audit log query permissions.

- Move Playwright E2E away from localStorage seed data to real backend API login and seed helpers.

- Add E2E coverage for route guards and audit log visibility.

- Run Playwright backend on port 3100 and proxy Vite API requests there to avoid local port conflicts.

- Make server:dev use the compiled NestJS server path, avoiding tsx parameter-property injection issues.

- Update README, AGENTS, feature, testing, security, deployment, progress, API, backendization, and auth/user module docs.
2026-05-02 02:04:56 +08:00

15 lines
452 B
TypeScript

import { expect, test } from '@playwright/test';
test('default quick login enters dashboard', async ({ page }) => {
await page.goto('/');
await page.evaluate(() => {
window.localStorage.clear();
window.sessionStorage.clear();
});
await page.getByText('admin / 123456').click();
await expect(page.getByRole('heading', { name: '工作台概览' })).toBeVisible();
await expect(page.getByText('超级管理员')).toBeVisible();
});