test(e2e): update e2e tests and auth tokens

- Update E2E test files with latest authentication tokens
- Improve test stability and error handling
- Update pytest configuration
- Enhance gateway direct test with settings integration
This commit is contained in:
张翔
2026-04-23 16:35:57 +08:00
parent f590c40c21
commit 0d0b4decc3
14 changed files with 1327 additions and 151 deletions
+3 -12
View File
@@ -10,7 +10,7 @@ test.describe('菜单管理功能测试', () => {
},
data: {
username: 'admin',
password: 'admin123'
password: 'Test@123'
}
});
@@ -21,17 +21,8 @@ test.describe('菜单管理功能测试', () => {
test('菜单列表显示测试', async ({ page }) => {
await test.step('导航到菜单管理页面', async () => {
await page.goto('http://localhost:3002/login');
const usernameInput = page.locator('input[type="text"], input[placeholder*="用户名"], input[placeholder*="账号"]').first();
const passwordInput = page.locator('input[type="password"]').first();
const loginButton = page.locator('button:has-text("登录")').first();
await usernameInput.fill('admin');
await passwordInput.fill('admin123');
await loginButton.click();
await page.waitForTimeout(2000);
await page.goto('http://localhost:3002/');
await page.waitForLoadState('networkidle');
// 点击系统管理菜单
const systemMenu = page.locator('.el-sub-menu:has-text("系统管理")').first();