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

22 lines
835 B
TypeScript

import { createListPageTests } from '../../test/factories/listPageTests';
import { createFixtureList, createAppointmentFixture } from '../../test/fixtures';
import AppointmentList from './AppointmentList';
const mockAppointments = createFixtureList(createAppointmentFixture, 15, [
{ id: 'appt-1', patient_name: '张三', doctor_name: '李医生', status: 'pending' },
{ id: 'appt-2', patient_name: '王五', doctor_name: '赵医生', status: 'confirmed' },
]);
createListPageTests({
Component: AppointmentList,
apiPath: '/api/v1/health/appointments',
columns: ['患者', '医护', '预约日期', '状态'],
firstRowTexts: ['张三'],
totalItems: 15,
hasCreateButton: true,
createButtonText: '新建预约',
hasSearch: true,
hasPagination: false,
mockItems: mockAppointments as Record<string, unknown>[],
});