feat: 添加异常日志功能并优化UI样式
refactor: 重构后端查询逻辑和API响应处理 fix: 修复用户角色更新和文件上传问题 test: 添加前端性能测试脚本和E2E测试用例 chore: 更新依赖版本和配置文件 docs: 添加环境检查脚本和测试文档 style: 统一表格标签样式和路由命名 perf: 优化前端页面加载速度和响应时间
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
import { test, expect } from '@playwright/test';
|
||||
import { LoginPage } from './pages/LoginPage';
|
||||
|
||||
test('调试:检查系统配置页面', async ({ page }) => {
|
||||
const loginPage = new LoginPage(page);
|
||||
|
||||
await test.step('管理员登录', async () => {
|
||||
await loginPage.goto();
|
||||
await loginPage.login('admin', 'admin123');
|
||||
await expect(page).toHaveURL(/.*dashboard/);
|
||||
console.log('登录成功,当前URL:', page.url());
|
||||
});
|
||||
|
||||
await test.step('导航到系统配置页面', async () => {
|
||||
await page.goto('/sys/config');
|
||||
await page.waitForLoadState('networkidle');
|
||||
console.log('导航到系统配置页面,当前URL:', page.url());
|
||||
|
||||
// 等待一段时间让页面完全加载
|
||||
await page.waitForTimeout(3000);
|
||||
});
|
||||
|
||||
await test.step('检查页面内容', async () => {
|
||||
// 截图查看页面状态
|
||||
await page.screenshot({ path: 'debug-config-page.png' });
|
||||
|
||||
// 检查页面标题
|
||||
const pageTitle = await page.title();
|
||||
console.log('页面标题:', pageTitle);
|
||||
|
||||
// 检查页面内容
|
||||
const bodyText = await page.textContent('body');
|
||||
console.log('页面内容片段:', bodyText.substring(0, 500));
|
||||
|
||||
// 检查是否有表格
|
||||
const tableExists = await page.locator('.el-table').count();
|
||||
console.log('表格数量:', tableExists);
|
||||
|
||||
// 检查是否有卡片
|
||||
const cardExists = await page.locator('.el-card').count();
|
||||
console.log('卡片数量:', cardExists);
|
||||
|
||||
// 检查是否有加载状态
|
||||
const loadingExists = await page.locator('.el-loading-mask').count();
|
||||
console.log('加载遮罩数量:', loadingExists);
|
||||
|
||||
// 检查页面是否有错误信息
|
||||
const errorElements = await page.locator('.el-message--error').count();
|
||||
console.log('错误消息数量:', errorElements);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user