Skip to content

Commit

Permalink
feat: added three dots spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
charlielizzy committed Feb 21, 2023
1 parent 75b605c commit 579c8af
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/components/atoms/Spinner/Spinner.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import axe from '../../../../axe-helper';
import { render } from '@testing-library/react';
import Spinner from './Spinner';
import ThreeDotsSpinner from './ThreeDotsSpinner';

describe('<Spinner />', () => {
it('renders a spinner', async () => {
Expand All @@ -21,3 +22,12 @@ describe('<Spinner />', () => {
expect(container.firstChild).toMatchSnapshot();
});
});

describe('<ThreeDotsSpinner />', () => {
it('renders three dots spinner', async () => {
const { container } = render(<ThreeDotsSpinner />);
expect(container.firstChild).toMatchSnapshot();
const results = await axe(container.innerHTML);
expect(results).toHaveNoViolations();
});
});
13 changes: 13 additions & 0 deletions src/components/atoms/Spinner/ThreeDotsSpinner.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import React from 'react';
import axe from '../../../../axe-helper';
import { render } from '@testing-library/react';
import ThreeDotsSpinner from './ThreeDotsSpinner';

describe('<ThreeDotsSpinner />', () => {
it('renders three dots spinner', async () => {
const { container } = render(<ThreeDotsSpinner />);
expect(container.firstChild).toMatchSnapshot();
const results = await axe(container.innerHTML);
expect(results).toHaveNoViolations();
});
});

0 comments on commit 579c8af

Please sign in to comment.