import { createListPageTests } from '../../test/factories/listPageTests';
import { createFixtureList, createPatientFixture } from '../../test/fixtures';
import PatientList from './PatientList';

const mockPatients = createFixtureList(createPatientFixture, 25, [
  { id: 'patient-1', name: '张三', gender: 'male' },
  { id: 'patient-2', name: '李四', gender: 'female' },
]);

createListPageTests({
  Component: PatientList,
  apiPath: '/api/v1/health/patients',
  columns: ['姓名', '性别', '年龄'],
  firstRowTexts: ['张三'],
  totalItems: 25,
  hasCreateButton: true,
  createButtonText: '新建患者',
  hasSearch: true,
  hasPagination: true,
  mockItems: mockPatients as Record<string, unknown>[],
});
