|
|
@@ -2357,20 +2357,20 @@ class WEB_002_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
- // 1. 点击用户管理
|
|
|
+ // 1. 展开系统管理
|
|
|
+ const systemMenu = await this.waitForElement('系统管理');
|
|
|
+ await this.click(systemMenu.uid);
|
|
|
+ await this.screenshot('01_system_menu');
|
|
|
+
|
|
|
+ // 2. 点击用户管理
|
|
|
const userMenu = await this.waitForElement('用户管理');
|
|
|
await this.click(userMenu.uid);
|
|
|
- await this.screenshot('01_user_menu');
|
|
|
-
|
|
|
- // 2. 查看用户列表
|
|
|
- const userList = await this.waitForElement('用户列表');
|
|
|
- await this.click(userList.uid);
|
|
|
await this.screenshot('02_user_list');
|
|
|
|
|
|
// 3. 等待列表加载
|
|
|
await this.wait(3);
|
|
|
// 验证列表显示
|
|
|
-const result = await this.getSnapshot();
|
|
|
+const result = await this.getSnapshot();
|
|
|
const hasUsers = result.some(item =>
|
|
|
item.text.includes('家长') ||
|
|
|
item.text.includes('孩子') ||
|
|
|
@@ -2385,7 +2385,7 @@ const result = await this.getSnapshot();
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * WEB-003: 管理员查看任务统计
|
|
|
+ * WEB-003: 管理员查看任务统计
|
|
|
*/
|
|
|
class WEB_003_TestCase extends WebTestCase {
|
|
|
constructor() {
|
|
|
@@ -2397,17 +2397,12 @@ class WEB_003_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
- // 1. 进入任务管理
|
|
|
- const taskMenu = await this.waitForElement('任务管理');
|
|
|
- await this.click(taskMenu.uid);
|
|
|
- await this.screenshot('01_task_menu');
|
|
|
+ // 1. 进入首页(仪表盘集成任务统计)
|
|
|
+ const dashboard = await this.waitForElement('首页');
|
|
|
+ await this.click(dashboard.uid);
|
|
|
+ await this.screenshot('01_dashboard');
|
|
|
|
|
|
- // 2. 查看统计
|
|
|
- const stats = await this.waitForElement('统计');
|
|
|
- await this.click(stats.uid);
|
|
|
- await this.screenshot('02_task_stats');
|
|
|
-
|
|
|
- // 3. 验证统计图表
|
|
|
+ // 2. 验证统计图表
|
|
|
const result = await this.getSnapshot();
|
|
|
const hasStats = result.some(item =>
|
|
|
item.text.includes('完成率') ||
|
|
|
@@ -2454,9 +2449,9 @@ class WEB_004_TestCase extends WebTestCase {
|
|
|
// 4. 验证成长规划师界面
|
|
|
const result = await this.getSnapshot();
|
|
|
const hasGuideFeatures = result.some(item =>
|
|
|
- item.text.includes('指导') ||
|
|
|
- item.text.includes('家庭') ||
|
|
|
- item.text.includes('任务')
|
|
|
+ item.text.includes('工作台') ||
|
|
|
+ item.text.includes('服务管理') ||
|
|
|
+ item.text.includes('家庭')
|
|
|
);
|
|
|
|
|
|
this.logResult(hasGuideFeatures);
|
|
|
@@ -2479,12 +2474,17 @@ class WEB_005_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginTeacher();
|
|
|
|
|
|
- // 1. 查看我的家庭
|
|
|
+ // 1. 展开服务管理
|
|
|
+ const serviceMenu = await this.waitForElement('服务管理');
|
|
|
+ await this.click(serviceMenu.uid);
|
|
|
+ await this.screenshot('01_service_menu');
|
|
|
+
|
|
|
+ // 2. 查看我的家庭
|
|
|
const myFamilies = await this.waitForElement('我的家庭');
|
|
|
await this.click(myFamilies.uid);
|
|
|
- await this.screenshot('01_my_families');
|
|
|
+ await this.screenshot('02_my_families');
|
|
|
|
|
|
- // 2. 验证家庭列表
|
|
|
+ // 3. 验证家庭列表
|
|
|
const result = await this.getSnapshot();
|
|
|
const hasFamilies = result.some(item =>
|
|
|
item.text.includes('家庭') ||
|
|
|
@@ -2511,20 +2511,25 @@ class WEB_006_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
- // 1. 进入成长规划师管理
|
|
|
- const guideMenu = await this.waitForElement('成长规划师管理');
|
|
|
- await this.click(guideMenu.uid);
|
|
|
- await this.screenshot('01_guide_menu');
|
|
|
+ // 1. 展开系统管理
|
|
|
+ const systemMenu = await this.waitForElement('系统管理');
|
|
|
+ await this.click(systemMenu.uid);
|
|
|
+ await this.screenshot('01_system_menu');
|
|
|
+
|
|
|
+ // 2. 进入规划师审核
|
|
|
+ const guideAudit = await this.waitForElement('规划师审核');
|
|
|
+ await this.click(guideAudit.uid);
|
|
|
+ await this.screenshot('02_guide_audit');
|
|
|
|
|
|
- // 2. 查看待审核
|
|
|
+ // 3. 查看待审核列表
|
|
|
const pendingBtn = await this.waitForElement('待审核');
|
|
|
await this.click(pendingBtn.uid);
|
|
|
- await this.screenshot('02_pending_guides');
|
|
|
+ await this.screenshot('03_pending_guides');
|
|
|
|
|
|
- // 3. 审核操作
|
|
|
+ // 4. 审核操作
|
|
|
const approveBtn = await this.waitForElement('通过');
|
|
|
await this.click(approveBtn.uid);
|
|
|
- await this.screenshot('03_approved');
|
|
|
+ await this.screenshot('04_approved');
|
|
|
|
|
|
this.logResult(true);
|
|
|
} catch (error) {
|
|
|
@@ -2546,55 +2551,68 @@ class WEB_007_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
- // 1. 进入统计分析
|
|
|
- const statsMenu = await this.waitForElement('统计分析');
|
|
|
- await this.click(statsMenu.uid);
|
|
|
- await this.screenshot('01_stats_menu');
|
|
|
+ // 1. 进入首页(Dashboard 集成统计概览)
|
|
|
+ const dashboard = await this.waitForElement('首页');
|
|
|
+ await this.click(dashboard.uid);
|
|
|
+ await this.screenshot('01_dashboard');
|
|
|
|
|
|
- // 2. 街道分布
|
|
|
- const streetBtn = await this.waitForElement('街道分布');
|
|
|
- await this.click(streetBtn.uid);
|
|
|
- await this.screenshot('02_street_stats');
|
|
|
+ // 2. 验证统计数据
|
|
|
+ const result = await this.getSnapshot();
|
|
|
+ const hasStats = result.some(item =>
|
|
|
+ item.text.includes('家庭') ||
|
|
|
+ item.text.includes('用户') ||
|
|
|
+ item.text.includes('统计')
|
|
|
+ );
|
|
|
|
|
|
-this.logResult(true);
|
|
|
- } catch (error) {
|
|
|
+this.logResult(hasStats);
|
|
|
+ } catch (error) {
|
|
|
this.logResult(false, error);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
|
|
|
/**
|
|
|
-* WEB-008: 成长规划师审核家庭任务
|
|
|
+* WEB-008: 成长规划师审核家庭任务
|
|
|
*/
|
|
|
class WEB_008_TestCase extends WebTestCase {
|
|
|
constructor() {
|
|
|
super('WEB-008', '成长规划师审核家庭任务', 'P0');
|
|
|
}
|
|
|
|
|
|
- async run() {
|
|
|
- try {
|
|
|
- await this.setup();
|
|
|
- await this.loginTeacher();
|
|
|
-
|
|
|
- // 1. 进入待审核任务
|
|
|
- const pendingTasks = await this.waitForElement('待审核任务');
|
|
|
- await this.click(pendingTasks.uid);
|
|
|
- await this.screenshot('01_pending_tasks');
|
|
|
-
|
|
|
- // 2. 审核通过
|
|
|
- const approveBtn = await this.waitForElement('通过');
|
|
|
- await this.click(approveBtn.uid);
|
|
|
- await this.screenshot('02_approved');
|
|
|
-
|
|
|
- this.logResult(true);
|
|
|
- } catch (error) {
|
|
|
- this.logResult(false, error);
|
|
|
+ async run() {
|
|
|
+ try {
|
|
|
+ await this.setup();
|
|
|
+ await this.loginTeacher();
|
|
|
+
|
|
|
+ // 1. 展开服务管理
|
|
|
+ const serviceMenu = await this.waitForElement('服务管理');
|
|
|
+ await this.click(serviceMenu.uid);
|
|
|
+ await this.screenshot('01_service_menu');
|
|
|
+
|
|
|
+ // 2. 进入我的家庭
|
|
|
+ const myFamilies = await this.waitForElement('我的家庭');
|
|
|
+ await this.click(myFamilies.uid);
|
|
|
+ await this.screenshot('02_my_families');
|
|
|
+
|
|
|
+ // 3. 查看待审核任务
|
|
|
+ const pendingTasks = await this.waitForElement('待审核');
|
|
|
+ await this.click(pendingTasks.uid);
|
|
|
+ await this.screenshot('03_pending_tasks');
|
|
|
+
|
|
|
+ // 4. 审核通过
|
|
|
+ const approveBtn = await this.waitForElement('通过');
|
|
|
+ await this.click(approveBtn.uid);
|
|
|
+ await this.screenshot('04_approved');
|
|
|
+
|
|
|
+ this.logResult(true);
|
|
|
+ } catch (error) {
|
|
|
+ this.logResult(false, error);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
-}
|
|
|
|
|
|
/**
|
|
|
-* WEB-009: 成长规划师查看家庭任务详情
|
|
|
+* WEB-009: 成长规划师查看家庭任务详情
|
|
|
*/
|
|
|
class WEB_009_TestCase extends WebTestCase {
|
|
|
constructor() {
|
|
|
@@ -2606,15 +2624,20 @@ class WEB_009_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginTeacher();
|
|
|
|
|
|
- // 1. 进入我的家庭
|
|
|
+ // 1. 展开服务管理
|
|
|
+ const serviceMenu = await this.waitForElement('服务管理');
|
|
|
+ await this.click(serviceMenu.uid);
|
|
|
+ await this.screenshot('01_service_menu');
|
|
|
+
|
|
|
+ // 2. 进入我的家庭
|
|
|
const myFamilies = await this.waitForElement('我的家庭');
|
|
|
await this.click(myFamilies.uid);
|
|
|
- await this.screenshot('01_family_list');
|
|
|
+ await this.screenshot('02_family_list');
|
|
|
|
|
|
- // 2. 查看详情
|
|
|
+ // 3. 查看详情
|
|
|
const detailBtn = await this.waitForElement('查看详情');
|
|
|
await this.click(detailBtn.uid);
|
|
|
- await this.screenshot('02_family_tasks');
|
|
|
+ await this.screenshot('03_family_tasks');
|
|
|
|
|
|
this.logResult(true);
|
|
|
} catch (error) {
|
|
|
@@ -2640,14 +2663,14 @@ class WEB_010_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
- // 进入用户管理
|
|
|
+ // 展开系统管理
|
|
|
+ const systemMenu = await this.waitForElement('系统管理');
|
|
|
+ await this.click(systemMenu.uid);
|
|
|
+ await this.screenshot('01_system_menu');
|
|
|
+
|
|
|
+ // 点击用户管理
|
|
|
const userMenu = await this.waitForElement('用户管理');
|
|
|
await this.click(userMenu.uid);
|
|
|
- await this.screenshot('01_user_menu');
|
|
|
-
|
|
|
- // 点击用户列表子菜单
|
|
|
- const userList = await this.waitForElement('用户列表');
|
|
|
- await this.click(userList.uid);
|
|
|
await this.screenshot('02_user_list');
|
|
|
|
|
|
// 验证用户列表数据
|
|
|
@@ -2678,17 +2701,20 @@ class WEB_011_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
- // 进入用户管理 -> 用户列表
|
|
|
- const userMenu = await this.waitForElement('用户管理');
|
|
|
- await this.click(userMenu.uid);
|
|
|
- const userList = await this.waitForElement('用户列表');
|
|
|
- await this.click(userList.uid);
|
|
|
- await this.screenshot('01_user_list');
|
|
|
+// 展开系统管理
|
|
|
+const systemMenu = await this.waitForElement('系统管理');
|
|
|
+await this.click(systemMenu.uid);
|
|
|
+await this.screenshot('01_system_menu');
|
|
|
+
|
|
|
+// 进入用户管理
|
|
|
+const userMenu = await this.waitForElement('用户管理');
|
|
|
+await this.click(userMenu.uid);
|
|
|
+await this.screenshot('02_user_list');
|
|
|
|
|
|
// 点击查看详情按钮
|
|
|
const detailBtn = await this.waitForElement('查看详情');
|
|
|
await this.click(detailBtn.uid);
|
|
|
- await this.screenshot('02_user_detail');
|
|
|
+ await this.screenshot('03_user_detail');
|
|
|
|
|
|
// 验证详情页
|
|
|
const result = await this.getSnapshot();
|
|
|
@@ -2717,14 +2743,15 @@ async run() {
|
|
|
try {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
+const systemMenu = await this.waitForElement('系统管理');
|
|
|
+await this.click(systemMenu.uid);
|
|
|
+await this.screenshot('01_system_menu');
|
|
|
const userMenu = await this.waitForElement('用户管理');
|
|
|
await this.click(userMenu.uid);
|
|
|
-const userList = await this.waitForElement('用户列表');
|
|
|
-await this.click(userList.uid);
|
|
|
-await this.screenshot('01_user_list');
|
|
|
+await this.screenshot('02_user_list');
|
|
|
const editBtn = await this.waitForElement('编辑');
|
|
|
await this.click(editBtn.uid);
|
|
|
-await this.screenshot('02_edit_modal');
|
|
|
+await this.screenshot('03_edit_modal');
|
|
|
const modalSnapshot = await this.getSnapshot();
|
|
|
const hasEditModal = modalSnapshot.some(item =>
|
|
|
item.text.includes('编辑') || item.text.includes('保存') ||
|
|
|
@@ -2774,12 +2801,15 @@ try {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
-// 进入用户管理 -> 用户列表
|
|
|
+// 展开系统管理
|
|
|
+const systemMenu = await this.waitForElement('系统管理');
|
|
|
+await this.click(systemMenu.uid);
|
|
|
+await this.screenshot('01_system_menu');
|
|
|
+
|
|
|
+// 进入用户管理
|
|
|
const userMenu = await this.waitForElement('用户管理');
|
|
|
await this.click(userMenu.uid);
|
|
|
-const userList = await this.waitForElement('用户列表');
|
|
|
-await this.click(userList.uid);
|
|
|
-await this.screenshot('01_user_list');
|
|
|
+await this.screenshot('02_user_list');
|
|
|
|
|
|
// 获取用户列表,找到一个可停用的账号(状态为正常的)
|
|
|
const snapshot = await this.getSnapshot();
|
|
|
@@ -2829,12 +2859,15 @@ try {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
-// 进入用户管理 -> 用户列表
|
|
|
+// 展开系统管理
|
|
|
+const systemMenu = await this.waitForElement('系统管理');
|
|
|
+await this.click(systemMenu.uid);
|
|
|
+await this.screenshot('01_system_menu');
|
|
|
+
|
|
|
+// 进入用户管理
|
|
|
const userMenu = await this.waitForElement('用户管理');
|
|
|
await this.click(userMenu.uid);
|
|
|
-const userList = await this.waitForElement('用户列表');
|
|
|
-await this.click(userList.uid);
|
|
|
-await this.screenshot('01_user_list');
|
|
|
+await this.screenshot('02_user_list');
|
|
|
|
|
|
// 获取用户列表,找到一个可启用的账号(状态为停用的)
|
|
|
const snapshot = await this.getSnapshot();
|
|
|
@@ -3835,9 +3868,9 @@ class WEB_040_TestCase extends WebTestCase {
|
|
|
// 验证成长规划师界面
|
|
|
const result = await this.getSnapshot();
|
|
|
const hasTeacherUI = result.some(item =>
|
|
|
- item.text.includes('指导') ||
|
|
|
- item.text.includes('家庭') ||
|
|
|
- item.text.includes('任务')
|
|
|
+ item.text.includes('工作台') ||
|
|
|
+ item.text.includes('服务管理') ||
|
|
|
+ item.text.includes('家庭')
|
|
|
);
|
|
|
|
|
|
this.logResult(hasTeacherUI);
|
|
|
@@ -3860,10 +3893,15 @@ class WEB_041_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginTeacher();
|
|
|
|
|
|
+ // 展开服务管理
|
|
|
+ const serviceMenu = await this.waitForElement('服务管理');
|
|
|
+ await this.click(serviceMenu.uid);
|
|
|
+ await this.screenshot('01_service_menu');
|
|
|
+
|
|
|
// 进入我的家庭
|
|
|
const myFamily = await this.waitForElement('我的家庭');
|
|
|
await this.click(myFamily.uid);
|
|
|
- await this.screenshot('01_my_families');
|
|
|
+ await this.screenshot('02_my_families');
|
|
|
|
|
|
// 验证家庭列表
|
|
|
const result = await this.getSnapshot();
|
|
|
@@ -3892,10 +3930,15 @@ class WEB_042_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginTeacher();
|
|
|
|
|
|
+ // 展开服务管理
|
|
|
+ const serviceMenu = await this.waitForElement('服务管理');
|
|
|
+ await this.click(serviceMenu.uid);
|
|
|
+ await this.screenshot('01_service_menu');
|
|
|
+
|
|
|
// 进入我的家庭
|
|
|
const myFamily = await this.waitForElement('我的家庭');
|
|
|
await this.click(myFamily.uid);
|
|
|
- await this.screenshot('01_family_list');
|
|
|
+ await this.screenshot('02_family_list');
|
|
|
|
|
|
// 查看任务详情
|
|
|
const taskDetail = await this.waitForElement('任务');
|
|
|
@@ -3930,10 +3973,20 @@ class WEB_043_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginTeacher();
|
|
|
|
|
|
+ // 展开服务管理
|
|
|
+ const serviceMenu = await this.waitForElement('服务管理');
|
|
|
+ await this.click(serviceMenu.uid);
|
|
|
+ await this.screenshot('01_service_menu');
|
|
|
+
|
|
|
+ // 进入我的家庭
|
|
|
+ const myFamily = await this.waitForElement('我的家庭');
|
|
|
+ await this.click(myFamily.uid);
|
|
|
+ await this.screenshot('02_my_families');
|
|
|
+
|
|
|
// 进入待审核任务
|
|
|
const pendingTasks = await this.waitForElement('待审核');
|
|
|
await this.click(pendingTasks.uid);
|
|
|
- await this.screenshot('01_pending_tasks');
|
|
|
+ await this.screenshot('03_pending_tasks');
|
|
|
|
|
|
// 验证待审核列表
|
|
|
const result = await this.getSnapshot();
|
|
|
@@ -3962,10 +4015,20 @@ class WEB_044_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginTeacher();
|
|
|
|
|
|
+ // 展开服务管理
|
|
|
+ const serviceMenu = await this.waitForElement('服务管理');
|
|
|
+ await this.click(serviceMenu.uid);
|
|
|
+ await this.screenshot('01_service_menu');
|
|
|
+
|
|
|
+ // 进入我的家庭
|
|
|
+ const myFamily = await this.waitForElement('我的家庭');
|
|
|
+ await this.click(myFamily.uid);
|
|
|
+ await this.screenshot('02_my_families');
|
|
|
+
|
|
|
// 进入待审核任务
|
|
|
const pendingTasks = await this.waitForElement('待审核');
|
|
|
await this.click(pendingTasks.uid);
|
|
|
- await this.screenshot('01_pending_tasks');
|
|
|
+ await this.screenshot('03_pending_tasks');
|
|
|
|
|
|
// 点击通过按钮
|
|
|
const approveBtn = await this.waitForElement('通过');
|
|
|
@@ -4000,10 +4063,20 @@ class WEB_045_TestCase extends WebTestCase {
|
|
|
await this.setup();
|
|
|
await this.loginTeacher();
|
|
|
|
|
|
+ // 展开服务管理
|
|
|
+ const serviceMenu = await this.waitForElement('服务管理');
|
|
|
+ await this.click(serviceMenu.uid);
|
|
|
+ await this.screenshot('01_service_menu');
|
|
|
+
|
|
|
+ // 进入我的家庭
|
|
|
+ const myFamily = await this.waitForElement('我的家庭');
|
|
|
+ await this.click(myFamily.uid);
|
|
|
+ await this.screenshot('02_my_families');
|
|
|
+
|
|
|
// 进入待审核任务
|
|
|
const pendingTasks = await this.waitForElement('待审核');
|
|
|
await this.click(pendingTasks.uid);
|
|
|
- await this.screenshot('01_pending_tasks');
|
|
|
+ await this.screenshot('03_pending_tasks');
|
|
|
|
|
|
// 点击拒绝按钮
|
|
|
const rejectBtn = await this.waitForElement('拒绝');
|
|
|
@@ -4077,12 +4150,15 @@ try {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
-// 进入用户管理 -> 用户列表
|
|
|
+// 展开系统管理
|
|
|
+const systemMenu = await this.waitForElement('系统管理');
|
|
|
+await this.click(systemMenu.uid);
|
|
|
+await this.screenshot('01_system_menu');
|
|
|
+
|
|
|
+// 进入用户管理
|
|
|
const userMenu = await this.waitForElement('用户管理');
|
|
|
await this.click(userMenu.uid);
|
|
|
-const userList = await this.waitForElement('用户列表');
|
|
|
-await this.click(userList.uid);
|
|
|
-await this.screenshot('01_user_list');
|
|
|
+await this.screenshot('02_user_list');
|
|
|
|
|
|
// 尝试在搜索框输入SQL注入payload
|
|
|
const searchInput = await this.waitForElement('搜索');
|
|
|
@@ -4123,14 +4199,15 @@ async run() {
|
|
|
try {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
+const systemMenu = await this.waitForElement('系统管理');
|
|
|
+await this.click(systemMenu.uid);
|
|
|
+await this.screenshot('01_system_menu');
|
|
|
const userMenu = await this.waitForElement('用户管理');
|
|
|
await this.click(userMenu.uid);
|
|
|
-const userList = await this.waitForElement('用户列表');
|
|
|
-await this.click(userList.uid);
|
|
|
-await this.screenshot('01_user_list');
|
|
|
+await this.screenshot('02_user_list');
|
|
|
const editBtn = await this.waitForElement('编辑');
|
|
|
await this.click(editBtn.uid);
|
|
|
-await this.screenshot('02_edit_modal');
|
|
|
+await this.screenshot('03_edit_modal');
|
|
|
const testPayload = '<script>alert(1)</script>';
|
|
|
const nicknameInput = await this.waitForElement('昵称', 3);
|
|
|
if (nicknameInput) {
|
|
|
@@ -4171,17 +4248,20 @@ try {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
-// 进入用户管理 -> 用户列表
|
|
|
+// 展开系统管理
|
|
|
+const systemMenu = await this.waitForElement('系统管理');
|
|
|
+await this.click(systemMenu.uid);
|
|
|
+await this.screenshot('01_system_menu');
|
|
|
+
|
|
|
+// 进入用户管理
|
|
|
const userMenu = await this.waitForElement('用户管理');
|
|
|
await this.click(userMenu.uid);
|
|
|
-const userList = await this.waitForElement('用户列表');
|
|
|
-await this.click(userList.uid);
|
|
|
-await this.screenshot('01_user_list');
|
|
|
+await this.screenshot('02_user_list');
|
|
|
|
|
|
// 点击编辑按钮
|
|
|
const editBtn = await this.waitForElement('编辑');
|
|
|
await this.click(editBtn.uid);
|
|
|
-await this.screenshot('02_edit_modal');
|
|
|
+await this.screenshot('03_edit_modal');
|
|
|
|
|
|
// 尝试在手机号输入框输入无效手机号(7位)
|
|
|
const invalidPhone = '1381234';
|
|
|
@@ -4238,17 +4318,20 @@ try {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
-// 进入用户管理 -> 用户列表
|
|
|
+// 展开系统管理
|
|
|
+const systemMenu = await this.waitForElement('系统管理');
|
|
|
+await this.click(systemMenu.uid);
|
|
|
+await this.screenshot('01_system_menu');
|
|
|
+
|
|
|
+// 进入用户管理
|
|
|
const userMenu = await this.waitForElement('用户管理');
|
|
|
await this.click(userMenu.uid);
|
|
|
-const userList = await this.waitForElement('用户列表');
|
|
|
-await this.click(userList.uid);
|
|
|
-await this.screenshot('01_user_list');
|
|
|
+await this.screenshot('02_user_list');
|
|
|
|
|
|
// 点击编辑按钮
|
|
|
const editBtn = await this.waitForElement('编辑');
|
|
|
await this.click(editBtn.uid);
|
|
|
-await this.screenshot('02_edit_modal');
|
|
|
+await this.screenshot('03_edit_modal');
|
|
|
|
|
|
// 尝试在身份证输入框输入无效身份证(17位,不是18位)
|
|
|
const invalidIdCard = '123456789012345678'; // 17位
|
|
|
@@ -4526,13 +4609,16 @@ try {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
+// 展开系统管理
|
|
|
+const systemMenu = await this.waitForElement('系统管理');
|
|
|
+await this.click(systemMenu.uid);
|
|
|
+await this.screenshot('01_system_menu');
|
|
|
+
|
|
|
// 访问用户列表
|
|
|
const userMenu = await this.waitForElement('用户管理');
|
|
|
await this.click(userMenu.uid);
|
|
|
-const userList = await this.waitForElement('用户列表');
|
|
|
-await this.click(userList.uid);
|
|
|
await this.wait(1);
|
|
|
-await this.screenshot('01_user_list');
|
|
|
+await this.screenshot('02_user_list');
|
|
|
|
|
|
const snapshot = await this.getSnapshot();
|
|
|
|
|
|
@@ -5117,12 +5203,16 @@ try {
|
|
|
await this.setup();
|
|
|
await this.loginAdmin();
|
|
|
|
|
|
+// 展开系统管理
|
|
|
+const systemMenu = await this.waitForElement('系统管理');
|
|
|
+await this.click(systemMenu.uid);
|
|
|
+await this.screenshot('01_system_menu');
|
|
|
+
|
|
|
// 访问用户管理
|
|
|
const userMenu = await this.waitForElement('用户管理');
|
|
|
await this.click(userMenu.uid);
|
|
|
-const userList = await this.waitForElement('用户列表');
|
|
|
-await this.click(userList.uid);
|
|
|
await this.wait(1);
|
|
|
+await this.screenshot('02_user_list');
|
|
|
|
|
|
// 准备超长字符串(10KB)
|
|
|
const longString = 'A'.repeat(10240);
|