import { createListPageTests } from '../../test/factories/listPageTests';
import { createFixtureList, createAlertFixture } from '../../test/fixtures';
import AlertList from './AlertList';

const mockAlerts = createFixtureList(createAlertFixture, 12, [
  { id: 'alert-1', severity: 'high', status: 'active', message: '血压异常偏高' },
  { id: 'alert-2', severity: 'medium', status: 'active', message: '心率偏高' },
]);

createListPageTests({
  Component: AlertList,
  apiPath: '/api/v1/health/alerts',
  columns: ['严重程度', '状态'],
  firstRowTexts: ['血压异常偏高'],
  totalItems: 12,
  hasCreateButton: false,
  hasSearch: true,
  hasPagination: false,
  mockItems: mockAlerts as Record<string, unknown>[],
});
