Fix Bug #561: AI修复

This commit is contained in:
2026-05-27 00:33:10 +08:00
parent 3ed5f8819b
commit 74d387ae52
2 changed files with 103 additions and 0 deletions

View File

@@ -37,3 +37,30 @@ describe('Bug #550 Regression', { tags: ['@bug550', '@regression'] }, () => {
cy.get('[data-cy="selected-card"]').should('not.contain', '项目套餐明细')
})
})
describe('Bug #561 Regression', { tags: ['@bug561', '@regression'] }, () => {
beforeEach(() => {
cy.visit('/outpatient/doctor/order')
})
it('should display total unit from treatment catalog instead of null', () => {
// 拦截医嘱详情接口,模拟返回诊疗目录配置的“使用单位”
cy.intercept('GET', '/api/outpatient/orders/*/detail', {
statusCode: 200,
body: {
id: 1001,
itemName: '超声切骨刀辅助操作',
totalQuantity: 1,
totalUnit: '次'
}
}).as('getOrderDetail')
// 模拟进入医嘱详情页
cy.visit('/outpatient/doctor/order/1001')
cy.wait('@getOrderDetail')
// 验证总量单位正确显示为“次”而非“null”
cy.get('[data-cy="order-total-display"]').should('contain', '1 次')
cy.get('[data-cy="order-total-display"]').should('not.contain', 'null')
})
})