Files
novalon-manage-system/novalon-manage-web/e2e/auth.setup.ts
T
张翔 f44cee4958 fix(docker,test): 修复 Docker 构建和测试配置
- 更新 Dockerfile 使用本地编译的 jar 文件
- 修复 vite.config.ts 移除未使用的 lodash-es 依赖
- 更新测试密码为 Test@123
2026-04-28 16:04:45 +08:00

17 lines
550 B
TypeScript

import { test as setup } from '@playwright/test';
const authFile = 'playwright/.auth/user.json';
setup('authenticate', async ({ page }) => {
await page.goto('/login');
await page.waitForLoadState('networkidle');
await page.locator('input[placeholder*="用户名"]').fill('admin');
await page.locator('input[placeholder*="密码"]').fill('Test@123');
await page.locator('button:has-text("登录")').click();
await page.waitForURL('**/dashboard', { timeout: 30000 });
await page.context().storageState({ path: authFile });
});