diff --git a/web/src/components/__tests__/ActivityIndicator.test.jsx b/web/src/components/__tests__/ActivityIndicator.test.jsx new file mode 100644 index 000000000..582be24af --- /dev/null +++ b/web/src/components/__tests__/ActivityIndicator.test.jsx @@ -0,0 +1,47 @@ +import { h } from 'preact'; +import ActivityIndicator from '../ActivityIndicator'; +import { render, screen } from '@testing-library/preact'; + +describe('ActivityIndicator', () => { + test('renders an ActivityIndicator with default size md', async () => { + render(); + expect(screen.getByLabelText('Loading…')).toMatchInlineSnapshot(` +
+
+
+ `); + }); + + test('renders an ActivityIndicator with size sm', async () => { + render(); + expect(screen.getByLabelText('Loading…')).toMatchInlineSnapshot(` +
+
+
+ `); + }); + + test('renders an ActivityIndicator with size lg', async () => { + render(); + expect(screen.getByLabelText('Loading…')).toMatchInlineSnapshot(` +
+
+
+ `); + }); +});