refactor(tests): 迁移 E2E 测试到独立的 e2e-tests 目录

This commit is contained in:
张翔
2026-04-17 18:39:20 +08:00
parent 45bb89fc7f
commit b48ae84344
49 changed files with 210 additions and 0 deletions
-16
View File
@@ -1,16 +0,0 @@
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('admin123');
await page.locator('button:has-text("登录")').click();
await page.waitForURL('**/dashboard', { timeout: 30000 });
await page.context().storageState({ path: authFile });
});