All checks were successful
Deploy to Test Environment / deploy-to-test (push) Successful in 13m30s
23 lines
915 B
TypeScript
23 lines
915 B
TypeScript
// src/components/LoadingSpinner.test.tsx
|
|
import React from 'react';
|
|
import { describe, it, expect } from 'vitest';
|
|
import { LoadingSpinner } from './LoadingSpinner';
|
|
import { renderWithProviders } from '../tests/utils/renderWithProviders';
|
|
|
|
describe('LoadingSpinner (in components)', () => {
|
|
it('should render the SVG with animation classes', () => {
|
|
const { container } = renderWithProviders(<LoadingSpinner />);
|
|
const svgElement = container.querySelector('svg');
|
|
expect(svgElement).toBeInTheDocument();
|
|
expect(svgElement).toHaveClass('animate-spin');
|
|
});
|
|
|
|
it('should contain the correct SVG paths for the spinner graphic', () => {
|
|
const { container } = renderWithProviders(<LoadingSpinner />);
|
|
const circle = container.querySelector('circle');
|
|
const path = container.querySelector('path');
|
|
expect(circle).toBeInTheDocument();
|
|
expect(path).toBeInTheDocument();
|
|
});
|
|
});
|