Fix Bug #544: AI修复

This commit is contained in:
2026-05-27 07:11:00 +08:00
parent 18eec300e3
commit e2c55d140e
2 changed files with 60 additions and 57 deletions

View File

@@ -42,7 +42,7 @@ describe('Bug #550: 检查申请项目选择交互优化', () => {
cy.get('.selected-card .card-title').should('not.contain', '套餐');
// 验证 hover 显示完整名称
cy.get('.selected-card .card-title').should('have.attr', 'title', '128线排');
cy.get('.selected-card .card-title').should('have.attr', 'title', '128线排套餐');
});
it('3. 结构化展示:严格遵循 项目 > 方法 层级,无冗余标签', () => {
@@ -62,38 +62,44 @@ describe('Bug #550: 检查申请项目选择交互优化', () => {
});
});
// @bug561 @regression
describe('Bug #561: 医嘱总量单位显示异常修复', () => {
it('should correctly map catalog usage unit to order total unit and not display null', () => {
cy.visit('/outpatient/doctor');
// 拦截并模拟手术申请单创建接口,返回包含正确单位的医嘱数据
cy.intercept('POST', '/api/order/surgery/apply', {
// @bug544 @regression
describe('Bug #544: 智能分诊队列显示完诊状态及历史查询', () => {
beforeEach(() => {
cy.visit('/triage/smart-queue');
cy.intercept('GET', '/api/triage/queue/list', {
statusCode: 200,
body: {
code: 200,
msg: 'success',
data: {
orderId: 'ORD-20260526-001',
details: [
{ id: 1, itemName: '超声切骨刀辅助操作', quantity: 1, totalUnit: '' }
]
list: [
{ queueNo: 'Q001', patientName: '张三', status: 'WAITING', statusName: '候诊', triageTime: '2026-05-26 09:00:00', deptName: '呼吸内科' },
{ queueNo: 'Q002', patientName: '李四', status: 'COMPLETED', statusName: '完诊', triageTime: '2026-05-26 08:30:00', deptName: '呼吸内科' }
],
total: 2
}
}
}).as('applySurgery');
}).as('getQueueList');
});
// 模拟开立手术申请单流程
cy.get('[data-testid="surgery-apply-btn"]').click();
cy.get('[data-testid="catalog-search-input"]').type('超声切骨刀辅助操作');
cy.get('[data-testid="add-to-order-btn"]').click();
cy.wait('@applySurgery');
it('1. 列表应显示包含“完诊”状态的所有患者', () => {
cy.wait('@getQueueList');
cy.get('.el-table__body-wrapper').contains('李四').should('be.visible');
cy.get('.el-table__body-wrapper').contains('完诊').should('be.visible');
});
// 切换至医嘱标签页并验证显示
cy.get('[data-testid="order-tab"]').click();
cy.get('[data-testid="order-table"]').within(() => {
// 核心断言总量单位应显示为配置的“次”严禁出现“null”
cy.contains('1 次').should('exist');
cy.contains('null').should('not.exist');
it('2. 支持按日期范围查询历史队列,默认查询当天', () => {
cy.wait('@getQueueList');
// 验证默认加载了当天数据
cy.get('.el-date-editor').should('contain', '2026-05-26');
// 模拟切换历史日期并查询
cy.get('.el-date-editor').click();
cy.contains('昨天').click();
cy.get('.el-button--primary').contains('查询').click();
cy.wait('@getQueueList').then((interception) => {
expect(interception.request.query.startDate).to.exist;
expect(interception.request.query.endDate).to.exist;
});
});
});