develop #3

Merged
zhangxiang merged 20 commits from develop into main 2026-04-16 07:30:23 +08:00
Showing only changes of commit 69aa566e3f - Show all commits
+28 -1
View File
@@ -144,8 +144,18 @@ async function captureStep(page, stepName) {
// 2.1 导航到用户管理页面
try {
// 尝试多种可能的导航方式
// 首先展开系统管理菜单(如果是折叠状态)
const systemMenuSelector = '.el-sub-menu:has-text("系统管理")';
const systemMenuElement = page.locator(systemMenuSelector).first();
if (await systemMenuElement.count() > 0) {
// 点击展开系统管理菜单
await systemMenuElement.click();
await page.waitForTimeout(500);
// 然后点击用户管理菜单项
const userMenuSelectors = [
'.el-menu-item:has-text("用户管理")',
'text=用户管理',
'text=用户',
'[data-menu="user"]',
@@ -169,6 +179,9 @@ async function captureStep(page, stepName) {
} else {
throw new Error('未找到用户管理菜单');
}
} else {
throw new Error('未找到系统管理菜单');
}
} catch (error) {
logTest('导航到用户管理页面', false, error.message);
}
@@ -206,7 +219,18 @@ async function captureStep(page, stepName) {
console.log('=====================================');
try {
// 首先展开系统管理菜单(如果是折叠状态)
const systemMenuSelector = '.el-sub-menu:has-text("系统管理")';
const systemMenuElement = page.locator(systemMenuSelector).first();
if (await systemMenuElement.count() > 0) {
// 点击展开系统管理菜单
await systemMenuElement.click();
await page.waitForTimeout(500);
// 然后点击角色管理菜单项
const roleMenuSelectors = [
'.el-menu-item:has-text("角色管理")',
'text=角色管理',
'text=角色',
'[data-menu="role"]',
@@ -230,6 +254,9 @@ async function captureStep(page, stepName) {
} else {
throw new Error('未找到角色管理菜单');
}
} else {
throw new Error('未找到系统管理菜单');
}
} catch (error) {
logTest('导航到角色管理页面', false, error.message);
}