feat(e2e): 优化测试配置并增强富文本编辑器测试
refactor(cases): 更新案例数据结构字段 test(admin): 增加富文本编辑器多种格式测试 fix(contact-form): 修复表单提交测试并移除skip标记 perf(smart-wait): 改进页面就绪等待逻辑 ci(playwright): 调整firefox配置并优化全局setup
This commit is contained in:
@@ -38,18 +38,14 @@ test.describe('管理后台冒烟测试', () => {
|
||||
await loginPage.goto();
|
||||
await loginPage.login('admin@novalon.cn', 'admin123456');
|
||||
|
||||
try {
|
||||
await expect(async () => {
|
||||
await page.waitForURL(/\/admin(?!\/login)/);
|
||||
}).toPass({ timeout: 15000 });
|
||||
} catch (error) {
|
||||
test.skip(true, '登录功能不稳定,跳过此测试');
|
||||
}
|
||||
await page.waitForURL(/\/admin(?!\/login)/, { timeout: 20000 });
|
||||
await page.waitForLoadState('networkidle', { timeout: 10000 });
|
||||
|
||||
await expect(dashboardPage.contentMenuItem).toBeVisible();
|
||||
await expect(dashboardPage.settingsMenuItem).toBeVisible();
|
||||
await expect(dashboardPage.usersMenuItem).toBeVisible();
|
||||
await expect(dashboardPage.logsMenuItem).toBeVisible();
|
||||
await expect(dashboardPage.sidebar).toBeVisible({ timeout: 10000 });
|
||||
await expect(dashboardPage.contentMenuItem).toBeVisible({ timeout: 5000 });
|
||||
await expect(dashboardPage.settingsMenuItem).toBeVisible({ timeout: 5000 });
|
||||
await expect(dashboardPage.usersMenuItem).toBeVisible({ timeout: 5000 });
|
||||
await expect(dashboardPage.logsMenuItem).toBeVisible({ timeout: 5000 });
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user