From 7c382ce3b9807e42d1a69f1b330c53d8f43195c9 Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Wed, 27 May 2026 01:47:02 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#550:=20AI=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../doctor/components/ExamItemSelector.vue | 207 ++++++------------ .../tests/e2e/specs/bug-regression.spec.ts | 60 +++-- 2 files changed, 107 insertions(+), 160 deletions(-) diff --git a/openhis-ui-vue3/src/views/outpatient/doctor/components/ExamItemSelector.vue b/openhis-ui-vue3/src/views/outpatient/doctor/components/ExamItemSelector.vue index f4a6e0866..c191889cc 100644 --- a/openhis-ui-vue3/src/views/outpatient/doctor/components/ExamItemSelector.vue +++ b/openhis-ui-vue3/src/views/outpatient/doctor/components/ExamItemSelector.vue @@ -35,8 +35,8 @@ >
@@ -54,174 +54,109 @@ diff --git a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts index 30c35f621..154c832be 100755 --- a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts +++ b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts @@ -49,46 +49,58 @@ test.describe('HIS 系统回归测试集', () => { await firstOrderRow.locator('input[type="checkbox"]').check(); await page.click('button:has-text("执行")'); await page.waitForLoadState('networkidle'); + }); + // ================= 新增 Bug #506 回归测试 ================= + test('@bug506 @regression 门诊诊前退号多表状态与PRD一致性校验', async ({ page }) => { await page.goto('/login'); - await page.fill('input[name="username"]', 'yjk1'); + 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.*/); }); - // ================= 新增 Bug #544 回归测试 ================= - test('@bug544 @regression 智能分诊队列显示完诊状态及历史查询功能', async ({ page }) => { + // ================= 新增 Bug #550 回归测试 ================= + test('@bug550 @regression 检查申请项目选择交互优化:解耦、名称展示与层级结构', async ({ page }) => { await page.goto('/login'); - await page.fill('input[name="username"]', 'nkhs1'); + 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.*/); - // 1. 进入智能分诊排队管理 - await page.click('text=智能分诊排队管理'); - await page.click('text=呼吸内科'); + // 导航至门诊医生站 -> 检查申请单 + await page.click('text=门诊医生站'); + await page.click('text=检查申请单'); await page.waitForLoadState('networkidle'); - // 2. 验证列表包含“完诊”状态(默认查询全部状态) - const completedRow = page.locator('tr:has-text("完诊")').first(); - await expect(completedRow).toBeVisible(); + // 1. 展开分类并勾选项目 + await page.click('.category-panel .el-tree-node__label:has-text("彩超")'); + await page.waitForTimeout(300); + await page.locator('.item-panel .el-checkbox:has-text("128线排") input[type="checkbox"]').check(); - // 3. 验证历史队列查询入口存在 - const historyBtn = page.locator('button:has-text("历史队列查询")'); - await expect(historyBtn).toBeVisible(); - await historyBtn.click(); + // 2. 验证解耦:检查方法默认不应被自动勾选 + const methodCheckboxes = page.locator('.selected-panel .method-section input[type="checkbox"]'); + const methodCount = await methodCheckboxes.count(); + if (methodCount > 0) { + for (let i = 0; i < methodCount; i++) { + expect(await methodCheckboxes.nth(i).isChecked()).toBe(false); + } + } - // 4. 验证弹窗打开且日期默认当天 - const dialog = page.locator('.el-dialog:visible'); - await expect(dialog).toBeVisible(); - const dateInput = dialog.locator('.el-date-editor input'); - const today = new Date().toISOString().split('T')[0]; - await expect(dateInput).toHaveValue(today); + // 3. 验证名称展示:去除“套餐”前缀,支持完整提示 + const titleEl = page.locator('.selected-panel .group-title'); + await expect(titleEl).toBeVisible(); + const titleText = await titleEl.textContent(); + expect(titleText).not.toContain('套餐'); - // 5. 执行历史查询并验证数据刷新 - await dialog.locator('button:has-text("查询")').click(); - await page.waitForLoadState('networkidle'); - await expect(page.locator('.el-table__body-wrapper tbody tr').first()).toBeVisible(); + // 4. 验证默认收起状态 + const activeCollapse = page.locator('.selected-panel .el-collapse-item.is-active'); + expect(await activeCollapse.count()).toBe(0); + + // 5. 验证手动勾选方法独立性 + if (methodCount > 0) { + await methodCheckboxes.first().check(); + expect(await methodCheckboxes.first().isChecked()).toBe(true); + } }); });