55 lines
2.2 KiB
TypeScript
Executable File
55 lines
2.2 KiB
TypeScript
Executable File
import { describe, it, cy } from 'cypress'
|
|
|
|
describe('门诊医生站-检查申请交互回归测试', () => {
|
|
// ... 原有测试用例 ...
|
|
|
|
/**
|
|
* @bug550 @regression
|
|
* 验证 Bug #550 修复:
|
|
* 1. 项目勾选与检查方法解耦,无自动联动
|
|
* 2. 已选卡片去除“套餐”前缀,支持悬停完整提示与宽度自适应
|
|
* 3. 已选区域严格遵循“项目 > 检查方法”层级,明细默认收起
|
|
*/
|
|
describe('Bug #550: 检查申请项目选择交互优化', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/outpatient/exam/apply')
|
|
cy.wait(1000) // 等待数据加载
|
|
})
|
|
|
|
it('should decouple item and method selection', () => {
|
|
// 展开分类并勾选项目
|
|
cy.get('.category-tree').contains('彩超').click()
|
|
cy.get('.item-list').contains('128线排').click()
|
|
|
|
// 验证:勾选项目后,下方检查方法不应被自动勾选
|
|
cy.get('.method-detail-list .el-checkbox').should('not.be.checked')
|
|
})
|
|
|
|
it('should display full name without redundant prefix and support tooltip', () => {
|
|
cy.get('.category-tree').contains('彩超').click()
|
|
cy.get('.item-list').contains('128线排套餐').click()
|
|
|
|
// 验证:卡片文本已清理“套餐”字样
|
|
cy.get('.selected-card .card-name').should('not.contain', '套餐')
|
|
// 验证:悬停属性包含完整原始名称
|
|
cy.get('.selected-card').should('have.attr', 'title').and('include', '128线排套餐')
|
|
})
|
|
|
|
it('should maintain strict hierarchy and default collapsed state', () => {
|
|
cy.get('.category-tree').contains('彩超').click()
|
|
cy.get('.item-list').contains('128线排').click()
|
|
|
|
// 验证:默认状态下明细区域不可见
|
|
cy.get('.method-detail-list').should('not.be.visible')
|
|
|
|
// 点击卡片展开明细
|
|
cy.get('.selected-card').click()
|
|
cy.get('.method-detail-list').should('be.visible')
|
|
|
|
// 验证:层级结构清晰,方法作为子项独立展示
|
|
cy.get('.method-detail-list .method-item').should('have.length.greaterThan', 0)
|
|
cy.get('.method-detail-list .method-item').first().contains('常规检查')
|
|
})
|
|
})
|
|
})
|