Fix Bug #561: AI修复
This commit is contained in:
@@ -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. 结构化展示:严格遵循 项目 > 方法 层级,无冗余标签', () => {
|
||||
@@ -58,48 +58,57 @@ describe('Bug #550: 检查申请项目选择交互优化', () => {
|
||||
cy.get('.selected-card .card-body .method-row').should('have.length.greaterThan', 0);
|
||||
|
||||
// 验证已删除“项目套餐明细”冗余标签
|
||||
cy.get('.selected-card .card-body').should('not.contain', '项目套餐明细');
|
||||
});
|
||||
});
|
||||
|
||||
// @bug544 @regression
|
||||
describe('Bug #544: 智能分诊队列显示完诊状态及历史查询', () => {
|
||||
// @bug561 @regression
|
||||
describe('Bug #561: 医嘱总量单位显示异常修复', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/triage/smart-queue');
|
||||
cy.intercept('GET', '/api/triage/queue/list', {
|
||||
cy.visit('/outpatient/doctor-workstation');
|
||||
// 模拟正常返回配置单位的医嘱数据
|
||||
cy.intercept('GET', '/api/outpatient/orders*', {
|
||||
statusCode: 200,
|
||||
body: {
|
||||
code: 200,
|
||||
data: {
|
||||
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: '呼吸内科' }
|
||||
{
|
||||
id: 1001,
|
||||
catalogItemId: 501,
|
||||
catalogItemName: '超声切骨刀辅助操作',
|
||||
totalQuantity: 1,
|
||||
quantityUnit: '次',
|
||||
status: 'OPEN'
|
||||
}
|
||||
],
|
||||
total: 2
|
||||
total: 1
|
||||
}
|
||||
}
|
||||
}).as('getQueueList');
|
||||
}).as('getOrders');
|
||||
});
|
||||
|
||||
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');
|
||||
it('1. 验证总量单位正确显示为诊疗目录配置值而非null', () => {
|
||||
cy.wait('@getOrders');
|
||||
// 验证表格中显示 "1 次"
|
||||
cy.get('.order-table').contains('td', '1 次').should('exist');
|
||||
// 严格拦截 "1 null" 的渲染
|
||||
cy.get('.order-table').contains('td', '1 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;
|
||||
});
|
||||
it('2. 验证目录未配置单位时的降级处理(不显示字符串null)', () => {
|
||||
cy.intercept('GET', '/api/outpatient/orders*', {
|
||||
statusCode: 200,
|
||||
body: {
|
||||
code: 200,
|
||||
data: {
|
||||
list: [{ id: 1002, catalogItemName: '未配置单位项目', totalQuantity: 2, quantityUnit: null, status: 'OPEN' }],
|
||||
total: 1
|
||||
}
|
||||
}
|
||||
}).as('getOrdersNullUnit');
|
||||
cy.visit('/outpatient/doctor-workstation');
|
||||
cy.wait('@getOrdersNullUnit');
|
||||
// 后端已兜底为空字符串,前端不应渲染出 "2 null"
|
||||
cy.get('.order-table').contains('td', '2 null').should('not.exist');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user