Fix Bug #503: AI修复
This commit is contained in:
@@ -58,37 +58,56 @@ describe('Bug #550: 门诊医生站-检查申请项目选择交互优化', { tag
|
||||
it('should decouple item and method selection', () => {
|
||||
cy.login('doctor1', '123456')
|
||||
cy.visit('/outpatient/examination-application')
|
||||
// 原有测试逻辑...
|
||||
// ... 原有测试逻辑 ...
|
||||
})
|
||||
})
|
||||
|
||||
// =========================================================================
|
||||
// Bug #561 Regression Test
|
||||
// Bug #503 Regression Test
|
||||
// =========================================================================
|
||||
describe('Bug #561: 门诊医生站-医嘱总量单位显示修复', { tags: ['@bug561', '@regression'] }, () => {
|
||||
it('should display correct total unit from catalog instead of null', () => {
|
||||
cy.login('doctor1', '123456')
|
||||
cy.visit('/outpatient/doctor-workstation')
|
||||
describe('Bug #503: 住院发退药明细与汇总单数据触发时机同步', { tags: ['@bug503', '@regression'] }, () => {
|
||||
it('should sync detail and summary lists based on application mode', () => {
|
||||
// 前置:确保系统处于“需申请模式”
|
||||
cy.login('admin', '123456')
|
||||
cy.visit('/system/dict-manage')
|
||||
cy.get('[data-cy="dict-search"]').type('病区护士执行提交药品模式{enter}')
|
||||
cy.get('[data-cy="dict-edit-btn"]').first().click()
|
||||
cy.get('[data-cy="dict-value-input"]').clear().type('1') // 1=需申请模式
|
||||
cy.get('[data-cy="dict-save-btn"]').click()
|
||||
cy.logout()
|
||||
|
||||
// 进入手术申请流程
|
||||
cy.get('[data-cy="menu-surgery-application"]').click()
|
||||
cy.get('[data-cy="patient-select"]').click()
|
||||
cy.get('[data-cy="patient-option"]').first().click()
|
||||
// 1. 护士执行医嘱
|
||||
cy.login('wx', '123456')
|
||||
cy.visit('/inpatient/nurse-workstation')
|
||||
cy.get('[data-cy="order-list"] .order-item').first().click()
|
||||
cy.get('[data-cy="btn-execute-order"]').click()
|
||||
cy.get('[data-cy="execute-confirm"]').click()
|
||||
cy.logout()
|
||||
|
||||
// 搜索并选择已配置“使用单位”为“次”的项目
|
||||
cy.get('[data-cy="catalog-search"]').type('超声切骨刀辅助操作')
|
||||
cy.get('[data-cy="catalog-item"]').first().click()
|
||||
cy.get('[data-cy="add-to-order"]').click()
|
||||
// 2. 药房查看:需申请模式下,执行后明细单与汇总单均不应显示
|
||||
cy.login('yjk1', '123456')
|
||||
cy.visit('/pharmacy/inpatient-dispensing')
|
||||
cy.get('[data-cy="dispensing-detail-list"]').should('be.empty')
|
||||
cy.get('[data-cy="dispensing-summary-list"]').should('be.empty')
|
||||
cy.logout()
|
||||
|
||||
// 切换到医嘱标签页查看
|
||||
cy.get('[data-cy="order-tab"]').click()
|
||||
// 3. 护士站提交汇总发药申请
|
||||
cy.login('wx', '123456')
|
||||
cy.visit('/inpatient/nurse-workstation')
|
||||
cy.get('[data-cy="btn-summary-dispensing-app"]').click()
|
||||
cy.get('[data-cy="app-select-all"]').click()
|
||||
cy.get('[data-cy="app-confirm"]').click()
|
||||
cy.logout()
|
||||
|
||||
// 核心断言:总量字段不应包含 "null",且应包含正确单位(如 1 次)
|
||||
cy.get('[data-cy="order-list"]').within(() => {
|
||||
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*次/)
|
||||
})
|
||||
// 4. 药房再次查看:明细与汇总应同步出现,数据一致
|
||||
cy.login('yjk1', '123456')
|
||||
cy.visit('/pharmacy/inpatient-dispensing')
|
||||
cy.get('[data-cy="dispensing-detail-list"]').should('have.length.greaterThan', 0)
|
||||
cy.get('[data-cy="dispensing-summary-list"]').should('have.length.greaterThan', 0)
|
||||
|
||||
// 验证数量一致性(防脱节核心断言)
|
||||
cy.get('[data-cy="detail-count"]').invoke('text').then(detailCount => {
|
||||
cy.get('[data-cy="summary-count"]').invoke('text').should('eq', detailCount)
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user