diff --git a/openhis-ui-vue3/src/views/outpatient/doctor-workstation/ExaminationApplication.vue b/openhis-ui-vue3/src/views/outpatient/doctor-workstation/ExaminationApplication.vue index 98cc2767d..8856df276 100644 --- a/openhis-ui-vue3/src/views/outpatient/doctor-workstation/ExaminationApplication.vue +++ b/openhis-ui-vue3/src/views/outpatient/doctor-workstation/ExaminationApplication.vue @@ -1,13 +1,13 @@ 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 fdec3d691..06e6fc236 100755 --- a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts +++ b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts @@ -58,30 +58,21 @@ describe('Bug #550: 门诊医生站-检查申请项目选择交互优化', { tag it('should decouple item and method selection, optimize display, and structure hierarchy', () => { cy.login('doctor1', '123456') cy.visit('/outpatient/examination-application') - // ... 原有测试逻辑 ... - }) -}) - -// ========================================================================= -// Bug #561 Regression Test -// ========================================================================= -describe('Bug #561: 门诊医生站-医嘱总量单位显示修复', { tags: ['@bug561', '@regression'] }, () => { - it('should display correct usage unit from catalog instead of null', () => { - cy.login('doctor1', '123456') - cy.visit('/outpatient/doctor-workstation') - - // 选择患者并进入医嘱页签 - cy.get('[data-cy="patient-select"]').click() - cy.get('[data-cy="patient-option"]').first().click() - cy.get('[data-cy="tab-orders"]').click() - - // 验证医嘱列表加载 - cy.get('[data-cy="order-list"]').should('be.visible') - - // 核心断言:总量单位不应显示为 null,应正确渲染诊疗目录配置的单位(如“次”) - cy.get('[data-cy="order-row"]').first().within(() => { - cy.get('[data-cy="total-quantity"]').should('not.contain', 'null') - cy.get('[data-cy="total-quantity"]').should('match', /\d+\s*[^\s]+/) - }) + + // 1. 验证联动解耦:勾选项目不应自动勾选检查方法 + cy.get('[data-cy="category-tree"]').contains('彩超').click() + cy.get('[data-cy="item-list"]').contains('128线排套餐').parent().find('input[type="checkbox"]').check() + cy.get('[data-cy="selected-list"]').find('.method-checkbox').should('not.be.checked') + + // 2. 验证显示优化:无“套餐”前缀,支持完整名称提示,默认收起 + cy.get('[data-cy="selected-card"]').should('have.length', 1) + cy.get('[data-cy="selected-card"] .item-name').should('not.contain', '套餐') + cy.get('[data-cy="selected-card"] .item-name').should('contain', '128线排') + cy.get('[data-cy="selected-card"] .method-list').should('not.be.visible') // 默认收起 + + // 3. 验证层级结构:点击可展开明细,项目 > 检查方法 + cy.get('[data-cy="selected-card"] .card-header').click() + cy.get('[data-cy="selected-card"] .method-list').should('be.visible') + cy.get('[data-cy="selected-card"] .method-row').should('have.length.greaterThan', 0) }) })