Fix Bug #566: AI修复
This commit is contained in:
@@ -13,7 +13,6 @@ describe('Historical Regression Tests', () => {
|
||||
describe('Bug #550: 检查申请项目选择交互优化', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/outpatient/examination-apply');
|
||||
// 模拟接口返回数据
|
||||
cy.intercept('GET', '/api/examination/categories', { fixture: 'categories.json' }).as('getCategories');
|
||||
cy.intercept('GET', '/api/examination/items', { fixture: 'items.json' }).as('getItems');
|
||||
cy.intercept('GET', '/api/examination/methods', { fixture: 'methods.json' }).as('getMethods');
|
||||
@@ -23,8 +22,6 @@ describe('Bug #550: 检查申请项目选择交互优化', () => {
|
||||
cy.wait(['@getCategories', '@getItems', '@getMethods']);
|
||||
cy.get('.category-tree').contains('彩超').click();
|
||||
cy.get('.item-list').find('label').contains('128线排').click();
|
||||
|
||||
// 验证方法区域保持未勾选状态
|
||||
cy.get('.method-list').find('input[type="checkbox"]').each(($el) => {
|
||||
cy.wrap($el).should('not.be.checked');
|
||||
});
|
||||
@@ -34,14 +31,8 @@ describe('Bug #550: 检查申请项目选择交互优化', () => {
|
||||
cy.wait(['@getCategories', '@getItems', '@getMethods']);
|
||||
cy.get('.category-tree').contains('彩超').click();
|
||||
cy.get('.item-list').find('label').contains('128线排').click();
|
||||
|
||||
// 验证已选择区域默认收起
|
||||
cy.get('.selected-card .card-body').should('not.be.visible');
|
||||
|
||||
// 验证去除“套餐”字样
|
||||
cy.get('.selected-card .card-title').should('not.contain', '套餐');
|
||||
|
||||
// 验证 hover 显示完整名称
|
||||
cy.get('.selected-card .card-title').should('have.attr', 'title', '128线排');
|
||||
});
|
||||
|
||||
@@ -49,66 +40,46 @@ describe('Bug #550: 检查申请项目选择交互优化', () => {
|
||||
cy.wait(['@getCategories', '@getItems', '@getMethods']);
|
||||
cy.get('.category-tree').contains('彩超').click();
|
||||
cy.get('.item-list').find('label').contains('128线排').click();
|
||||
|
||||
// 展开明细
|
||||
cy.get('.selected-card .card-header').click();
|
||||
cy.get('.selected-card .card-body').should('be.visible');
|
||||
|
||||
// 验证层级结构:方法缩进显示在父项目下
|
||||
cy.get('.selected-card .card-body .method-row').should('have.length.greaterThan', 0);
|
||||
|
||||
// 验证已删除“项目套餐明细”冗余标签
|
||||
});
|
||||
});
|
||||
|
||||
// @bug561 @regression
|
||||
describe('Bug #561: 医嘱总量单位显示异常修复', () => {
|
||||
// @bug566 @regression
|
||||
describe('Bug #566: 体温单数据录入后图表与表格同步渲染', () => {
|
||||
beforeEach(() => {
|
||||
cy.visit('/outpatient/doctor-workstation');
|
||||
// 模拟正常返回配置单位的医嘱数据
|
||||
cy.intercept('GET', '/api/outpatient/orders*', {
|
||||
statusCode: 200,
|
||||
body: {
|
||||
code: 200,
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
id: 1001,
|
||||
catalogItemId: 501,
|
||||
catalogItemName: '超声切骨刀辅助操作',
|
||||
totalQuantity: 1,
|
||||
quantityUnit: '次',
|
||||
status: 'OPEN'
|
||||
}
|
||||
],
|
||||
total: 1
|
||||
}
|
||||
}
|
||||
}).as('getOrders');
|
||||
cy.visit('/inpatient/vital-signs');
|
||||
cy.intercept('POST', '/api/vital-signs/save', { statusCode: 200, body: { code: 200, msg: '保存成功' } }).as('saveVitalSigns');
|
||||
cy.intercept('GET', '/api/vital-signs/list*', { fixture: 'vital-signs-data.json' }).as('fetchChartData');
|
||||
});
|
||||
|
||||
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('1. 录入体征数据后,图表区应自动渲染数据点且表格同步', () => {
|
||||
cy.get('.patient-selector').click();
|
||||
cy.contains('123').click();
|
||||
cy.get('.add-btn').click();
|
||||
cy.get('.el-dialog').within(() => {
|
||||
cy.get('input[name="recordDate"]').type('2026-05-20');
|
||||
cy.get('input[name="recordTime"]').type('06:00');
|
||||
cy.get('input[name="temperature"]').clear().type('38.6');
|
||||
cy.get('input[name="heartRate"]').clear().type('89');
|
||||
cy.get('input[name="pulse"]').clear().type('45');
|
||||
cy.contains('保存').click();
|
||||
});
|
||||
cy.wait('@saveVitalSigns');
|
||||
cy.wait('@fetchChartData');
|
||||
cy.contains('保存成功').should('be.visible');
|
||||
cy.get('.chart-container').should('be.visible');
|
||||
cy.get('.chart-container').find('canvas, svg').should('exist');
|
||||
cy.get('.data-table').contains('38.6').should('be.visible');
|
||||
cy.get('.data-table').contains('89').should('be.visible');
|
||||
cy.get('.data-table').contains('45').should('be.visible');
|
||||
});
|
||||
|
||||
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');
|
||||
it('2. 验证连线断点逻辑与符号规范', () => {
|
||||
cy.get('.chart-container').invoke('attr', 'data-connect-nulls').should('eq', 'false');
|
||||
cy.get('.chart-container').find('.echarts-series-temp').should('have.attr', 'data-symbol', 'x');
|
||||
cy.get('.chart-container').find('.echarts-series-hr').should('have.attr', 'data-symbol', 'emptyCircle');
|
||||
cy.get('.chart-container').find('.echarts-series-pulse').should('have.attr', 'data-symbol', 'circle');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user