import { createListPageTests } from '../../test/factories/listPageTests';
import FollowUpRecordList from './FollowUpRecordList';

const mockRecords = Array.from({ length: 10 }, (_, i) => ({
  id: `record-${i + 1}`,
  patient_id: `patient-${i + 1}`,
  patient_name: `患者${i + 1}`,
  task_id: `task-${i + 1}`,
  status: i % 2 === 0 ? 'completed' : 'cancelled',
  follow_up_date: '2026-05-10',
  created_at: '2026-04-01T10:00:00Z',
  updated_at: '2026-04-01T10:00:00Z',
  version: 1,
}));

createListPageTests({
  Component: FollowUpRecordList,
  apiPath: '/api/v1/health/follow-up-records',
  columns: ['执行人', '执行日期'],
  firstRowTexts: ['record-1'],
  totalItems: 10,
  hasCreateButton: false,
  hasSearch: true,
  hasPagination: false,
  mockItems: mockRecords as Record<string, unknown>[],
});
