feat: 添加异常日志功能并优化UI样式
refactor: 重构后端查询逻辑和API响应处理 fix: 修复用户角色更新和文件上传问题 test: 添加前端性能测试脚本和E2E测试用例 chore: 更新依赖版本和配置文件 docs: 添加环境检查脚本和测试文档 style: 统一表格标签样式和路由命名 perf: 优化前端页面加载速度和响应时间
This commit is contained in:
@@ -15,7 +15,7 @@ test.describe('用户管理 E2E 测试', () => {
|
||||
userManagementPage = new UserManagementPage(page);
|
||||
|
||||
await loginPage.goto();
|
||||
await loginPage.login('admin', 'password');
|
||||
await loginPage.login('admin', 'admin123');
|
||||
});
|
||||
|
||||
test('创建用户完整流程', async ({ page }) => {
|
||||
@@ -26,6 +26,7 @@ test.describe('用户管理 E2E 测试', () => {
|
||||
const timestamp = Date.now();
|
||||
const userData = {
|
||||
username: `testuser_${timestamp}`,
|
||||
nickname: `测试用户${timestamp}`,
|
||||
email: `test_${timestamp}@example.com`,
|
||||
phone: '13800138000',
|
||||
password: 'Test123!@#',
|
||||
@@ -36,6 +37,18 @@ test.describe('用户管理 E2E 测试', () => {
|
||||
await userManagementPage.submitForm();
|
||||
|
||||
await expect(userManagementPage.successMessage).toBeVisible();
|
||||
await page.waitForTimeout(3000);
|
||||
|
||||
const userCount = await userManagementPage.getUserCount();
|
||||
console.log(`User count after creation: ${userCount}`);
|
||||
|
||||
await page.reload();
|
||||
await page.waitForLoadState('networkidle');
|
||||
await page.waitForTimeout(2000);
|
||||
|
||||
const userCountAfterReload = await userManagementPage.getUserCount();
|
||||
console.log(`User count after reload: ${userCountAfterReload}`);
|
||||
|
||||
await expect(userManagementPage.table).toContainText(userData.username);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user