Fix Bug #579: AI修复
This commit is contained in:
@@ -2,6 +2,7 @@ import { describe, it, expect, vi } from 'vitest';
|
||||
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';
|
||||
|
||||
// @bug466 @regression
|
||||
describe('Bug #466: 检验申请单核心质控字段及联动逻辑', () => {
|
||||
@@ -64,22 +65,22 @@ describe('Bug #568: 收费工作站-门诊日结排版修复', () => {
|
||||
});
|
||||
});
|
||||
|
||||
// @bug571 @regression
|
||||
describe('Bug #571: 检验申请执行“撤回”操作时触发错误提示', () => {
|
||||
it('撤回已签发的检验申请应成功并更新状态为待签发', async () => {
|
||||
// 模拟后端撤回接口调用
|
||||
const mockRevokeApi = vi.fn().mockResolvedValue({ code: 200, msg: '撤回成功' });
|
||||
// @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 result = await mockRevokeApi(10086);
|
||||
expect(result.code).toBe(200);
|
||||
expect(result.msg).toBe('撤回成功');
|
||||
expect(mockRevokeApi).toHaveBeenCalledWith(10086);
|
||||
});
|
||||
|
||||
it('非已签发状态执行撤回应拦截并提示', async () => {
|
||||
const mockRevokeApi = vi.fn().mockRejectedValue(new Error('当前状态不允许撤回'));
|
||||
const columns = wrapper.findAll('el-table-column-stub');
|
||||
expect(columns.length).toBeGreaterThan(0);
|
||||
|
||||
await expect(mockRevokeApi(10086)).rejects.toThrow('当前状态不允许撤回');
|
||||
// 验证所有列均配置了对齐属性,避免默认左对齐导致的数字/状态列错位
|
||||
columns.forEach(col => {
|
||||
expect(col.attributes('align')).toBeDefined();
|
||||
expect(col.attributes('prop')).toBeDefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user