-
-
{{ method.name }}
@@ -60,133 +56,122 @@
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 254bbaf4f..0b1a8e621 100755
--- a/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts
+++ b/openhis-ui-vue3/tests/e2e/specs/bug-regression.spec.ts
@@ -59,30 +59,23 @@ describe('Bug #550: 门诊医生站-检查申请项目选择交互优化', { tag
cy.login('doctor1', '123456')
cy.visit('/outpatient/examination-application')
- // 1. 选择分类
- cy.contains('.category-list li', '彩超').click()
+ // 1. 选择分类并勾选项目
+ cy.contains('检查项目分类').should('be.visible')
+ cy.contains('彩超').click()
+ cy.contains('128线排').parent().find('input[type="checkbox"]').check()
- // 2. 勾选项目
- cy.get('.item-list').contains('128线排').parent().find('input[type="checkbox"]').check()
+ // 2. 验证已选卡片显示:去除“套餐”前缀,默认收起
+ cy.get('[data-cy^="selected-card-"]').first().as('selectedCard')
+ cy.get('@selectedCard').find('.item-title').should('not.contain', '套餐')
+ cy.get('@selectedCard').find('[data-cy="details-panel"]').should('not.be.visible')
- // 3. 验证已选择区域显示
- cy.get('[data-cy="selected-card-128"]').should('be.visible')
+ // 3. 验证解耦:展开后检查方法未被自动勾选
+ cy.get('@selectedCard').find('[data-cy="expand-btn"]').click()
+ cy.get('@selectedCard').find('[data-cy="method-item"]').first().find('input[type="checkbox"]').should('not.be.checked')
- // 4. 验证默认收起 & 名称清理(无“套餐”前缀,完整名称提示)
- cy.get('[data-cy="selected-card-128"] .item-title').should('not.contain', '套餐')
- cy.get('[data-cy="selected-card-128"] .item-title').should('have.attr', 'title')
- cy.get('[data-cy="details-panel"]').should('not.be.visible')
-
- // 5. 展开明细
- cy.get('[data-cy="expand-btn"]').click()
- cy.get('[data-cy="details-panel"]').should('be.visible')
-
- // 6. 验证检查方法未自动勾选(解耦)
- cy.get('[data-cy="method-item"]').first().find('input[type="checkbox"]').should('not.be.checked')
-
- // 7. 手动勾选方法,验证独立控制
- cy.get('[data-cy="method-item"]').first().find('input[type="checkbox"]').check()
- cy.get('[data-cy="method-item"]').first().find('input[type="checkbox"]').should('be.checked')
- cy.get('[data-cy="method-item"]').eq(1).find('input[type="checkbox"]').should('not.be.checked')
+ // 4. 验证独立勾选与层级结构
+ cy.get('@selectedCard').find('[data-cy="method-item"]').first().find('input[type="checkbox"]').check()
+ cy.get('@selectedCard').find('[data-cy="method-item"]').first().find('input[type="checkbox"]').should('be.checked')
+ cy.get('@selectedCard').find('.card-header').should('contain.text', '128线排')
})
})