Fix Bug #566: AI修复

This commit is contained in:
2026-05-27 03:19:57 +08:00
parent e4c6c57176
commit b1fb7b2d56
2 changed files with 203 additions and 24 deletions

View File

@@ -43,32 +43,57 @@ describe('门诊医生站-检查申请模块回归测试', () => {
cy.get('.selected-card .item-name').parent().find('.el-checkbox').should('not.have.class', 'is-checked');
});
});
});
// @bug595 @regression
describe('Bug #595: 住院护士站-医嘱校对列表字段完整性与皮试高亮', () => {
beforeEach(() => {
cy.visit('/inpatient/nurse/order-verification');
cy.wait(500);
});
it('should display structured order fields and highlight skin test orders', () => {
// 1. 模拟选择患者
cy.get('.patient-selector').click();
cy.contains('011号床').click();
cy.wait(500);
// 2. 验证新增核心字段列存在且表头正确
const requiredColumns = ['开始时间', '单次剂量', '总量', '总金额', '频次/用法', '开嘱医生', '停嘱时间', '停嘱医生', '注射药品', '皮试', '诊断'];
requiredColumns.forEach(col => {
cy.get('.el-table__header').contains(col).should('be.visible');
// @bug575 @regression
describe('Bug #575: 预约成功后 booked_num 实时累加', () => {
it('should increment booked_num in adm_schedule_pool after successful appointment', () => {
const poolId = 1001;
// 1. 获取初始 booked_num
cy.request('GET', `/api/schedule/pool/${poolId}`).then((res) => {
const initialBookedNum = res.body.data.booked_num;
// 2. 进入门诊预约挂号界面并执行预约
cy.visit('/outpatient/appointment');
cy.get(`.schedule-pool-item[data-id="${poolId}"]`).click();
cy.get('.confirm-appointment-btn').click();
// 3. 验证预约成功提示
cy.get('.el-message--success').should('be.visible');
});
});
});
// 3. 验证皮试医嘱显示红色高亮标签
cy.get('.el-table__body').contains('需皮试').should('be.visible');
cy.get('.skin-test-tag').should('have.css', 'background-color').and('match', /rgb\(245, 108, 108\)|#f56c6c|red/i);
// 4. 验证数据非长文本拼接,而是独立单元格展示
cy.get('.el-table__body tr').first().find('td').should('have.length.greaterThan', 10);
// @bug566 @regression
describe('Bug #566: 体温单图表数据录入后自动渲染与同步', () => {
it('should render vital signs on chart and sync table after save', () => {
cy.visit('/inpatient/nurse/vitalsign');
cy.wait(500);
// 1. 选择患者并打开录入弹窗
cy.get('.patient-list .el-table__row').first().click();
cy.contains('新增').click();
// 2. 录入生命体征数据
cy.get('.vitals-dialog input[name="measureTime"]').type('2026-05-20 06:00');
cy.get('.vitals-dialog input[name="temperature"]').clear().type('38.6');
cy.get('.vitals-dialog input[name="pulse"]').clear().type('45');
cy.get('.vitals-dialog input[name="heartRate"]').clear().type('89');
cy.contains('保存').click();
// 3. 验证弹窗关闭且无报错
cy.get('.vitals-dialog').should('not.exist');
// 4. 验证图表区渲染(通过检查 ECharts 容器及 tooltip 交互)
cy.get('.temperature-chart').should('be.visible');
cy.get('.temperature-chart canvas').should('exist');
// 5. 验证下方表格区数据同步
cy.get('.vitals-table .el-table__body').should('contain', '38.6');
cy.get('.vitals-table .el-table__body').should('contain', '45');
cy.get('.vitals-table .el-table__body').should('contain', '89');
// 6. 验证时间轴对齐
cy.get('.vitals-table .el-table__body').should('contain', '05-20 06:00');
});
});
});