From f545b794e8fcceea0012c1d7e0cff95c0b0eca63 Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Tue, 26 May 2026 21:03:05 +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 --- .../examination/ExaminationRequest.vue | 193 ++++++++++++++++++ tests/e2e/specs/bug-regression.spec.ts | 49 +++++ 2 files changed, 242 insertions(+) create mode 100644 openhis-ui-vue3/src/views/clinicmanagement/doctorstation/examination/ExaminationRequest.vue create mode 100644 tests/e2e/specs/bug-regression.spec.ts diff --git a/openhis-ui-vue3/src/views/clinicmanagement/doctorstation/examination/ExaminationRequest.vue b/openhis-ui-vue3/src/views/clinicmanagement/doctorstation/examination/ExaminationRequest.vue new file mode 100644 index 000000000..69ee7741b --- /dev/null +++ b/openhis-ui-vue3/src/views/clinicmanagement/doctorstation/examination/ExaminationRequest.vue @@ -0,0 +1,193 @@ + + + + + diff --git a/tests/e2e/specs/bug-regression.spec.ts b/tests/e2e/specs/bug-regression.spec.ts new file mode 100644 index 000000000..ff88c8b7f --- /dev/null +++ b/tests/e2e/specs/bug-regression.spec.ts @@ -0,0 +1,49 @@ +import { test, expect } from '@playwright/test'; + +// 原有回归测试用例... +test.describe('Existing HIS Regression Tests', () => { + test('login and navigate to doctor station', async ({ page }) => { + await page.goto('/login'); + 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.*/); + }); +}); + +// @bug550 @regression +test.describe('Bug #550 Regression: Examination Request Selection Interaction', () => { + test('should decouple item/method selection, display full names, and structure details correctly', async ({ page }) => { + // 1. 进入门诊医生站-检查申请单 + await page.goto('/clinic/doctor-station/examination'); + await page.waitForLoadState('networkidle'); + + // 2. 展开“彩超”分类并勾选“128线排” + await page.click('text=彩超'); + await page.waitForSelector('.item-checkbox:has-text("128线排")'); + await page.check('.item-checkbox:has-text("128线排")'); + + // 3. 验证联动解耦:检查方法不应被自动勾选 + const methodCheckbox = page.locator('.method-container .el-checkbox').first(); + await expect(methodCheckbox).not.toBeChecked(); + + // 4. 验证卡片显示:无“套餐”前缀,支持完整名称提示,宽度自适应 + const selectedCard = page.locator('.selected-group').first(); + await expect(selectedCard).toContainText('128线排'); + await expect(selectedCard).not.toContainText('套餐'); + + // 验证悬停提示完整名称 + await selectedCard.hover(); + const tooltip = page.locator('.el-tooltip__trigger'); + await expect(tooltip).toBeVisible(); + + // 5. 验证默认收起状态 + const methodContainer = page.locator('.method-container'); + await expect(methodContainer).not.toBeVisible(); + + // 6. 验证层级结构:点击展开后显示“检查项目 > 检查方法” + await page.click('.group-header'); + await expect(methodContainer).toBeVisible(); + await expect(page.locator('.method-container .el-checkbox')).toHaveCount(1); // 至少展示关联方法 + }); +});