feat: 异步解析大文件WPS报备资料
This commit is contained in:
@@ -6,6 +6,7 @@ import { ReportMaterialImportModal } from './ReportMaterialImportModal';
|
||||
const { adminApi } = vi.hoisted(() => ({
|
||||
adminApi: {
|
||||
analyzeReportMaterialImport: vi.fn(),
|
||||
getReportMaterialImportAnalysisStatus: vi.fn(),
|
||||
listDrainageFields: vi.fn(),
|
||||
listEnterpriseApplicationOptions: vi.fn(),
|
||||
listReportImportProfiles: vi.fn(),
|
||||
@@ -27,6 +28,15 @@ describe('ReportMaterialImportModal mapping profile action', () => {
|
||||
adminApi.listReportImportProfiles.mockResolvedValue([]);
|
||||
adminApi.analyzeReportMaterialImport.mockResolvedValue({
|
||||
id: 'analysis-1',
|
||||
status: 'queued',
|
||||
progress: 10,
|
||||
progressStage: '文件已上传,等待解析',
|
||||
});
|
||||
adminApi.getReportMaterialImportAnalysisStatus.mockResolvedValue({
|
||||
id: 'analysis-1',
|
||||
status: 'analyzed',
|
||||
progress: 100,
|
||||
progressStage: '解析完成',
|
||||
columns: [
|
||||
{ sourceColumnIndex: 0, columnLetter: 'A', sourceHeader: '签名', sourceHeaderPath: '签名', imageCount: 0 },
|
||||
],
|
||||
@@ -59,5 +69,5 @@ describe('ReportMaterialImportModal mapping profile action', () => {
|
||||
expect(screen.getByRole('button', { name: '本次将保存/更新映射方案' })).toHaveAttribute('aria-pressed', 'true'),
|
||||
);
|
||||
expect(screen.getByLabelText('映射方案名称')).toBeVisible();
|
||||
});
|
||||
}, 10_000);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user