Fix Bug #590: AI修复

This commit is contained in:
2026-05-26 21:22:38 +08:00
parent 6be1efe380
commit 3361298c1b
2 changed files with 157 additions and 16 deletions

View File

@@ -3,6 +3,7 @@ import { mount } from '@vue/test-utils';
import LabRequest from '@/views/inpatientdoctorstation/lab/LabRequest.vue';
import OutpatientDailySettlement from '@/views/billing/outpatientsettlement/OutpatientDailySettlement.vue';
import OutpatientChargeReport from '@/views/billing/outpatientcharge/OutpatientChargeReport.vue';
import PendingMedicalRecord from '@/views/doctorstation/outpatient/PendingMedicalRecord.vue';
// @bug466 @regression
describe('Bug #466: 检验申请单核心质控字段及联动逻辑', () => {
@@ -65,22 +66,20 @@ describe('Bug #568: 收费工作站-门诊日结排版修复', () => {
});
});
// @bug579 @regression
describe('Bug #579: 门诊收费报表列表格式修复', () => {
it('门诊收费报表表格列应正确对齐且字段一一对应,防止排版错乱', () => {
const wrapper = mount(OutpatientChargeReport, {
global: { stubs: ['el-card', 'el-form', 'el-form-item', 'el-date-picker', 'el-select', 'el-option', 'el-button', 'el-table', 'el-table-column', 'el-pagination', 'el-tag'] }
});
const table = wrapper.find('el-table-stub');
expect(table.exists()).toBe(true);
const columns = wrapper.findAll('el-table-column-stub');
expect(columns.length).toBeGreaterThan(0);
// 验证所有列均配置了对齐属性,避免默认左对齐导致的数字/状态列错位
columns.forEach(col => {
expect(col.attributes('align')).toBeDefined();
expect(col.attributes('prop')).toBeDefined();
// @bug590 @regression
describe('Bug #590: 门诊医生工作站-待写病历操作卡片排版修复', () => {
it('“查看患者”与“写病历”按钮应在同一行排列,且容器使用 flex 布局防止错乱', () => {
const wrapper = mount(PendingMedicalRecord, {
global: { stubs: ['el-card', 'el-button', 'el-tag', 'el-empty', 'el-pagination', 'el-form', 'el-form-item', 'el-input'] }
});
const actionContainer = wrapper.find('.record-action-bar');
expect(actionContainer.exists()).toBe(true);
// 验证 flex 布局确保同行排列,避免换行或错位
const styleAttr = actionContainer.attributes('style') || '';
expect(styleAttr).toContain('display: flex');
expect(styleAttr).toContain('align-items: center');
// 验证两个操作按钮存在且可交互
expect(wrapper.find('[data-cy="view-patient"]').exists()).toBe(true);
expect(wrapper.find('[data-cy="write-record"]').exists()).toBe(true);
});
});