diff --git a/src/components/Loader/Loader.test.tsx b/src/components/Loader/Loader.test.tsx index a40774cb63..50ca448b48 100644 --- a/src/components/Loader/Loader.test.tsx +++ b/src/components/Loader/Loader.test.tsx @@ -23,25 +23,39 @@ describe('Testing Loader component', () => { ); + const spinner = screen.getByTestId('spinner'); expect(screen.getByTestId('spinner-wrapper')).toBeInTheDocument(); - expect(screen.getByTestId('spinner')).toBeInTheDocument(); - expect(screen.getByTestId('spinner')).toHaveClass( + expect(spinner).toBeInTheDocument(); + expect(spinner).toHaveClass( '_spinnerSm_1vy2z_21 spinner-border text-primary' ); }); test('Component should render with large size', () => { - render(); + render( + + + + ); + const spinner = screen.getByTestId('spinner'); + expect(screen.getByTestId('spinner-wrapper')).toBeInTheDocument(); + expect(spinner).toBeInTheDocument(); expect(spinner).toHaveClass( '_spinnerLg_1vy2z_15 spinner-border text-primary' ); }); test('renders with extra-large size', () => { - render(); - const spinner = screen.getByTestId('spinner'); + render( + + + + ); + const spinner = screen.getByTestId('spinner'); + expect(screen.getByTestId('spinner-wrapper')).toBeInTheDocument(); + expect(spinner).toBeInTheDocument(); expect(spinner).toHaveClass( '_spinnerXl_1vy2z_9 spinner-border text-primary' );