- 添加 matchMedia + ResizeObserver mock (Ant Design 依赖) - renderWithProviders 注入 auth state + localStorage token - 修复 fixture 批量生成自动分配唯一 id - PatientList 5 测试 / AlertList 3 测试 / DoctorList 4 测试
19 lines
595 B
TypeScript
19 lines
595 B
TypeScript
import { createListPageTests } from '../../test/factories/listPageTests';
|
|
import { createFixtureList, createDoctorFixture } from '../../test/fixtures';
|
|
import DoctorList from './DoctorList';
|
|
|
|
const mockDoctors = createFixtureList(createDoctorFixture, 8);
|
|
|
|
createListPageTests({
|
|
Component: DoctorList,
|
|
apiPath: '/api/v1/health/doctors',
|
|
columns: ['姓名', '科室', '职称'],
|
|
firstRowTexts: ['李医生'],
|
|
totalItems: 8,
|
|
hasCreateButton: true,
|
|
createButtonText: '新建医护',
|
|
hasSearch: true,
|
|
hasPagination: false,
|
|
mockItems: mockDoctors as Record<string, unknown>[],
|
|
});
|