Fix Bug #550: AI修复
This commit is contained in:
@@ -55,50 +55,34 @@ describe('Bug #562: 门诊医生工作站-待写病历加载性能与状态修
|
||||
// Bug #550 Regression Test
|
||||
// =========================================================================
|
||||
describe('Bug #550: 门诊医生站-检查申请项目选择交互优化', { tags: ['@bug550', '@regression'] }, () => {
|
||||
it('should decouple item and method selection', () => {
|
||||
it('should decouple item and method selection, optimize display, and structure hierarchy', () => {
|
||||
cy.login('doctor1', '123456')
|
||||
cy.visit('/outpatient/examination-application')
|
||||
// ... existing test logic ...
|
||||
})
|
||||
})
|
||||
|
||||
// =========================================================================
|
||||
// Bug #503 Regression Test
|
||||
// =========================================================================
|
||||
describe('Bug #503: 住院发退药明细与汇总单触发时机同步', { tags: ['@bug503', '@regression'] }, () => {
|
||||
it('should sync detail and summary visibility based on nurse drug submit mode', () => {
|
||||
// 1. 护士执行医嘱
|
||||
cy.login('wx', '123456')
|
||||
cy.visit('/inpatient/nurse-station')
|
||||
cy.get('[data-cy="order-list"] .order-item').first().click()
|
||||
cy.get('[data-cy="btn-execute-order"]').click()
|
||||
cy.get('[data-cy="confirm-execute"]').click()
|
||||
|
||||
// 2. 切换至药房查看(需申请模式下,执行后明细与汇总均不应显示)
|
||||
cy.login('yjk1', '123456')
|
||||
cy.visit('/pharmacy/inpatient-dispensing')
|
||||
cy.intercept('GET', '**/api/pharmacy/dispensing/detail*').as('getDetail')
|
||||
cy.intercept('GET', '**/api/pharmacy/dispensing/summary*').as('getSummary')
|
||||
cy.reload()
|
||||
cy.wait('@getDetail').its('response.body.data').should('be.empty')
|
||||
cy.wait('@getSummary').its('response.body.data').should('be.empty')
|
||||
|
||||
// 3. 护士执行汇总发药申请
|
||||
cy.login('wx', '123456')
|
||||
cy.visit('/inpatient/nurse-station/summary-apply')
|
||||
cy.get('[data-cy="btn-apply-summary"]').click()
|
||||
cy.get('[data-cy="toast-success"]').should('be.visible')
|
||||
|
||||
// 4. 药房再次查看,明细与汇总应同时出现且数据一致
|
||||
cy.login('yjk1', '123456')
|
||||
cy.visit('/pharmacy/inpatient-dispensing')
|
||||
cy.wait('@getDetail').its('response.body.data').should('have.length.greaterThan', 0)
|
||||
cy.wait('@getSummary').its('response.body.data').should('have.length.greaterThan', 0)
|
||||
|
||||
// 验证明细与汇总的药品数量/状态一致
|
||||
cy.get('[data-cy="detail-count"]').then($detail => {
|
||||
const detailCount = parseInt($detail.text())
|
||||
cy.get('[data-cy="summary-count"]').should('have.text', detailCount.toString())
|
||||
})
|
||||
|
||||
// 1. 选择分类
|
||||
cy.contains('.category-list li', '彩超').click()
|
||||
|
||||
// 2. 勾选项目
|
||||
cy.get('.item-list').contains('128线排').parent().find('input[type="checkbox"]').check()
|
||||
|
||||
// 3. 验证已选择区域显示
|
||||
cy.get('[data-cy="selected-card-128"]').should('be.visible')
|
||||
|
||||
// 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')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user