Admin Page work - Still blank/broken

This commit is contained in:
Eric Gullickson
2025-11-06 16:29:11 -06:00
parent 858cf31d38
commit 5630979adf
38 changed files with 7373 additions and 924 deletions

View File

@@ -0,0 +1,39 @@
/**
* @ai-summary Tests for AdminSkeleton components
*/
import React from 'react';
import { render } from '@testing-library/react';
import { AdminSkeleton } from '../../components/AdminSkeleton';
describe('AdminSkeleton', () => {
describe('SkeletonRow', () => {
it('should render default number of rows', () => {
const { container } = render(<AdminSkeleton.SkeletonRow />);
expect(container).toMatchSnapshot();
});
it('should render specified number of rows', () => {
const { container } = render(<AdminSkeleton.SkeletonRow count={5} />);
expect(container).toMatchSnapshot();
expect(container.querySelectorAll('.MuiSkeleton-root')).toHaveLength(15); // 3 skeletons per row * 5 rows
});
});
describe('SkeletonCard', () => {
it('should render default number of cards', () => {
const { container } = render(<AdminSkeleton.SkeletonCard />);
expect(container).toMatchSnapshot();
});
it('should render specified number of cards', () => {
const { container } = render(<AdminSkeleton.SkeletonCard count={4} />);
expect(container).toMatchSnapshot();
expect(container.querySelectorAll('.MuiCard-root')).toHaveLength(4);
});
});
});