|
@@ -72,6 +72,63 @@ test.describe('用户管理模块', () => {
|
|
|
await page.click('button:has-text("确 定")');
|
|
await page.click('button:has-text("确 定")');
|
|
|
await expect(page.locator('text=男性肩宽范围为36-52cm')).toBeVisible();
|
|
await expect(page.locator('text=男性肩宽范围为36-52cm')).toBeVisible();
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-012B: 肩宽范围验证-女性', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=用户管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("新增用户")');
|
|
|
|
|
+ await page.fill('input[placeholder="请输入姓名"]', '测试用户');
|
|
|
|
|
+ await page.click('.el-select:has-text("请选择性别")');
|
|
|
|
|
+ await page.click('li:has-text("女")');
|
|
|
|
|
+ await page.fill('input[placeholder="请输入肩宽(cm)"]', '50');
|
|
|
|
|
+ await page.click('button:has-text("确 定")');
|
|
|
|
|
+ await expect(page.locator('text=女性肩宽范围为32-46cm')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-013: 姓名必填验证', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=用户管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("新增用户")');
|
|
|
|
|
+ await page.click('button:has-text("确 定")');
|
|
|
|
|
+ await expect(page.locator('text=姓名为必填项')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-014: 手机号必填验证', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=用户管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("新增用户")');
|
|
|
|
|
+ await page.fill('input[placeholder="请输入姓名"]', '测试用户');
|
|
|
|
|
+ await page.click('button:has-text("确 定")');
|
|
|
|
|
+ await expect(page.locator('text=手机号为必填项')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-015: 年龄范围验证', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=用户管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("新增用户")');
|
|
|
|
|
+ await page.fill('input[placeholder="请输入姓名"]', '测试用户');
|
|
|
|
|
+ await page.fill('input[placeholder="请输入手机号"]', '13900000000');
|
|
|
|
|
+ await page.fill('input[placeholder="请输入年龄"]', '150');
|
|
|
|
|
+ await page.click('button:has-text("确 定")');
|
|
|
|
|
+ await expect(page.locator('text=年龄范围')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-016: 编辑用户', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=用户管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("编辑") >> nth=0');
|
|
|
|
|
+ await page.waitForTimeout(500);
|
|
|
|
|
+ await expect(page.locator('text=编辑用户')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-017: 删除用户-取消', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=用户管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("删除") >> nth=0');
|
|
|
|
|
+ await page.waitForTimeout(500);
|
|
|
|
|
+ await page.click('button:has-text("取 消")');
|
|
|
|
|
+ await expect(page.locator('text=用户列表')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
test.describe('穴位管理模块', () => {
|
|
test.describe('穴位管理模块', () => {
|
|
@@ -88,6 +145,15 @@ test.describe('穴位管理模块', () => {
|
|
|
await page.waitForTimeout(1000);
|
|
await page.waitForTimeout(1000);
|
|
|
await expect(page.locator('text=穴位列表')).toBeVisible();
|
|
await expect(page.locator('text=穴位列表')).toBeVisible();
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-021: 新增穴位-名称必填验证', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=穴位管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("新增穴位")');
|
|
|
|
|
+ await page.waitForTimeout(500);
|
|
|
|
|
+ await page.click('button:has-text("确 定")');
|
|
|
|
|
+ await expect(page.locator('text=穴位名称为必填项')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
test.describe('方案管理模块', () => {
|
|
test.describe('方案管理模块', () => {
|
|
@@ -104,6 +170,31 @@ test.describe('方案管理模块', () => {
|
|
|
await page.waitForTimeout(1000);
|
|
await page.waitForTimeout(1000);
|
|
|
await expect(page.locator('text=方案列表')).toBeVisible();
|
|
await expect(page.locator('text=方案列表')).toBeVisible();
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-031: 新增方案-名称必填验证', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=方案管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("新增方案")');
|
|
|
|
|
+ await page.waitForTimeout(500);
|
|
|
|
|
+ await page.click('button:has-text("确 定")');
|
|
|
|
|
+ await expect(page.locator('text=方案名称为必填项')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-032: 查看方案详情', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=方案管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("查看") >> nth=0');
|
|
|
|
|
+ await page.waitForTimeout(500);
|
|
|
|
|
+ await expect(page.locator('text=方案详情')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-033: 编辑方案', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=方案管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("编辑") >> nth=0');
|
|
|
|
|
+ await page.waitForTimeout(500);
|
|
|
|
|
+ await expect(page.locator('text=编辑方案')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
test.describe('设备管理模块', () => {
|
|
test.describe('设备管理模块', () => {
|
|
@@ -120,6 +211,24 @@ test.describe('设备管理模块', () => {
|
|
|
await page.waitForTimeout(1000);
|
|
await page.waitForTimeout(1000);
|
|
|
await expect(page.locator('text=设备列表')).toBeVisible();
|
|
await expect(page.locator('text=设备列表')).toBeVisible();
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-041: 新增设备-编号必填验证', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=设备管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("新增设备")');
|
|
|
|
|
+ await page.waitForTimeout(500);
|
|
|
|
|
+ await page.fill('input[placeholder="请输入设备名称"]', '测试设备');
|
|
|
|
|
+ await page.click('button:has-text("确 定")');
|
|
|
|
|
+ await expect(page.locator('text=设备编号为必填项')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-042: 查看设备详情', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=设备管理');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("查看") >> nth=0');
|
|
|
|
|
+ await page.waitForTimeout(500);
|
|
|
|
|
+ await expect(page.locator('text=设备详情')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
test.describe('系统管理模块', () => {
|
|
test.describe('系统管理模块', () => {
|
|
@@ -144,4 +253,26 @@ test.describe('系统管理模块', () => {
|
|
|
await page.waitForTimeout(1000);
|
|
await page.waitForTimeout(1000);
|
|
|
await expect(page.locator('text=操作日志')).toBeVisible();
|
|
await expect(page.locator('text=操作日志')).toBeVisible();
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-052: 新增管理员-用户名必填验证', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=系统管理');
|
|
|
|
|
+ await page.click('text=管理员');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("新增管理员")');
|
|
|
|
|
+ await page.waitForTimeout(500);
|
|
|
|
|
+ await page.click('button:has-text("确 定")');
|
|
|
|
|
+ await expect(page.locator('text=用户名为必填项')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ test('TC-053: 新增管理员-密码格式验证', async ({ page }) => {
|
|
|
|
|
+ await page.click('text=系统管理');
|
|
|
|
|
+ await page.click('text=管理员');
|
|
|
|
|
+ await page.waitForTimeout(1000);
|
|
|
|
|
+ await page.click('button:has-text("新增管理员")');
|
|
|
|
|
+ await page.waitForTimeout(500);
|
|
|
|
|
+ await page.fill('input[placeholder="请输入用户名"]', 'testadmin');
|
|
|
|
|
+ await page.fill('input[placeholder="请输入密码"]', '123');
|
|
|
|
|
+ await page.click('button:has-text("确 定")');
|
|
|
|
|
+ await expect(page.locator('text=密码需8-20字符')).toBeVisible();
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|