Files
hms/apps/web/src/pages/health/FollowUpTaskList.test.tsx
iven 6709df62ed test(web): 第一批列表页测试 — 7 个页面 + 修复导入路径
- AppointmentList / FollowUpTaskList / FollowUpRecordList / ConsultationList
- FollowUpTemplateList / DialysisManageList / OfflineEventList
- 修复 FollowUpTemplateList 导入路径 bug (../../../ → ../../)
2026-05-03 23:19:55 +08:00

28 lines
809 B
TypeScript

import { createListPageTests } from '../../test/factories/listPageTests';
import FollowUpTaskList from './FollowUpTaskList';
const mockTasks = Array.from({ length: 10 }, (_, i) => ({
id: `task-${i + 1}`,
patient_id: `patient-${i + 1}`,
patient_name: `患者${i + 1}`,
template_id: `tmpl-1`,
template_name: '血压随访',
status: i % 2 === 0 ? 'pending' : 'completed',
due_date: '2026-05-15',
created_at: '2026-04-01T10:00:00Z',
updated_at: '2026-04-01T10:00:00Z',
version: 1,
}));
createListPageTests({
Component: FollowUpTaskList,
apiPath: '/api/v1/health/follow-up-tasks',
columns: ['患者', '状态'],
firstRowTexts: ['患者1'],
totalItems: 10,
hasCreateButton: false,
hasSearch: true,
hasPagination: false,
mockItems: mockTasks as Record<string, unknown>[],
});