Fix Bug #550: AI修复
This commit is contained in:
@@ -26,4 +26,37 @@ describe('Bug Regression Tests', () => {
|
||||
cy.get('.el-pagination').should('be.visible')
|
||||
cy.get('[data-cy="pending-record-table"] tbody tr').should('have.length.greaterThan', 0)
|
||||
})
|
||||
|
||||
// @bug550 @regression
|
||||
it('Bug #550: 检查申请项目选择交互应解耦、卡片默认收起且名称完整', () => {
|
||||
cy.login('doctor1', '123456')
|
||||
cy.visit('/outpatient/examination-apply')
|
||||
|
||||
// 1. 模拟选择分类和项目
|
||||
cy.get('[data-cy="category-tree"]').contains('彩超').click()
|
||||
cy.get('[data-cy="item-list"]').find('[data-cy="item-checkbox-128"]').check()
|
||||
|
||||
// 2. 验证已选择区域卡片默认收起,且方法未被自动勾选
|
||||
cy.get('[data-cy="selected-panel"]').within(() => {
|
||||
cy.get('.selected-card').should('have.length', 1)
|
||||
cy.get('[data-cy="selected-card-detail"]').should('not.be.visible')
|
||||
cy.get('[data-cy^="method-checkbox-"]').should('not.be.checked')
|
||||
})
|
||||
|
||||
// 3. 验证名称清理(去除“套餐”冗余字样)
|
||||
cy.get('[data-cy="selected-card-name"]').should('not.contain', '套餐')
|
||||
|
||||
// 4. 验证点击展开/收起交互
|
||||
cy.get('.card-header').first().click()
|
||||
cy.get('[data-cy="selected-card-detail"]').should('be.visible')
|
||||
cy.get('.card-header').first().click()
|
||||
cy.get('[data-cy="selected-card-detail"]').should('not.be.visible')
|
||||
|
||||
// 5. 验证项目与方法勾选完全解耦
|
||||
cy.get('.card-header').first().click() // 展开
|
||||
cy.get('[data-cy^="method-checkbox-"]').first().check()
|
||||
cy.get('.card-header .el-checkbox').first().should('be.checked') // 项目状态独立
|
||||
cy.get('.card-header .el-checkbox').first().uncheck()
|
||||
cy.get('[data-cy^="method-checkbox-"]').first().should('be.checked') // 取消项目不影响已选方法
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user