Fix Bug #574: AI修复
This commit is contained in:
@@ -58,47 +58,37 @@ test.describe('HIS 系统回归测试集', () => {
|
||||
const firstOrderRow = page.locator('.el-table__body-wrapper tbody tr').first();
|
||||
await firstOrderRow.locator('input[type="checkbox"]').check();
|
||||
await page.click('button:has-text("执行")');
|
||||
await expect(page.locator('.el-message--success')).toContainText('执行成功');
|
||||
});
|
||||
|
||||
// ================= 新增 Bug #550 回归测试 =================
|
||||
test('@bug550 @regression 门诊检查申请项目选择交互优化', async ({ page }) => {
|
||||
// ================= 新增 Bug #574 回归测试 =================
|
||||
test('@bug574 @regression 预约签到缴费成功后排班状态流转为3', async ({ page }) => {
|
||||
// 1. 登录 admin
|
||||
await page.goto('/login');
|
||||
await page.fill('input[name="username"]', 'doctor');
|
||||
await page.fill('input[name="username"]', 'admin');
|
||||
await page.fill('input[name="password"]', '123456');
|
||||
await page.click('button[type="submit"]');
|
||||
await expect(page).toHaveURL(/.*dashboard.*/);
|
||||
|
||||
await page.click('text=门诊医生站');
|
||||
await page.click('text=检查申请单');
|
||||
// 2. 进入门诊挂号界面
|
||||
await page.click('text=门诊挂号');
|
||||
await page.waitForLoadState('networkidle');
|
||||
|
||||
// 1. 展开分类并勾选项目
|
||||
await page.click('text=彩超');
|
||||
const itemCheckbox = page.locator('.exam-item-checkbox').filter({ hasText: '128线排' }).locator('input[type="checkbox"]');
|
||||
await itemCheckbox.check();
|
||||
// 3. 选取已有预约的患者
|
||||
const appointmentRow = page.locator('.el-table__body-wrapper tbody tr').first();
|
||||
await appointmentRow.click();
|
||||
|
||||
// 2. 验证联动冲突已解耦:检查方法不应被自动勾选
|
||||
const methodCheckboxes = page.locator('.method-checkbox input[type="checkbox"]');
|
||||
const methodCount = await methodCheckboxes.count();
|
||||
if (methodCount > 0) {
|
||||
const firstMethodChecked = await methodCheckboxes.first().isChecked();
|
||||
expect(firstMethodChecked).toBe(false); // 默认不自动勾选,保持独立
|
||||
}
|
||||
// 4. 执行预约签到
|
||||
await page.click('button:has-text("预约签到")');
|
||||
await expect(page.locator('.el-message--success')).toContainText('签到成功');
|
||||
|
||||
// 3. 验证卡片默认收起且无冗余“套餐”文案
|
||||
const selectedCard = page.locator('.selected-card').first();
|
||||
await expect(selectedCard.locator('.card-details')).toBeHidden(); // 默认收起
|
||||
await expect(selectedCard.locator('.item-name')).not.toContainText('套餐'); // 清理前缀
|
||||
// 5. 执行缴费操作
|
||||
await page.click('button:has-text("缴费")');
|
||||
await page.click('button:has-text("确认支付")');
|
||||
await expect(page.locator('.el-message--success')).toContainText('缴费成功');
|
||||
|
||||
// 4. 验证展开/收起交互与层级结构
|
||||
await selectedCard.locator('.card-header').click();
|
||||
await expect(selectedCard.locator('.card-details')).toBeVisible();
|
||||
|
||||
// 5. 验证方法独立勾选
|
||||
if (methodCount > 0) {
|
||||
await methodCheckboxes.first().check();
|
||||
const isChecked = await methodCheckboxes.first().isChecked();
|
||||
expect(isChecked).toBe(true);
|
||||
}
|
||||
// 6. 验证状态已更新为“已取号/待就诊”
|
||||
const statusTag = page.locator('.el-tag:has-text("已取号")');
|
||||
await expect(statusTag).toBeVisible();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user