aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/atoms/modal/modal.test.tsx
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-10-31 16:00:45 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-11 18:15:27 +0100
commit3ff4c37a7a2c40340c17f9e6c1754444bce0f839 (patch)
tree551ca3df148d46af2bd27995fa98c01378030644 /src/components/atoms/modal/modal.test.tsx
parent0e52a59917406ad03c174e030c6c1c92ab23449d (diff)
refactor(components): rewrite Modal component
* add an optional close button * add an icon prop
Diffstat (limited to 'src/components/atoms/modal/modal.test.tsx')
-rw-r--r--src/components/atoms/modal/modal.test.tsx26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/components/atoms/modal/modal.test.tsx b/src/components/atoms/modal/modal.test.tsx
deleted file mode 100644
index dfa4a88..0000000
--- a/src/components/atoms/modal/modal.test.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { describe, expect, it } from '@jest/globals';
-import { render, screen as rtlScreen } from '../../../../tests/utils';
-import { Heading } from '../heading';
-import { Modal } from './modal';
-
-const title = 'A custom title';
-const children =
- 'Labore ullam delectus sit modi quam dolores. Ratione id sint aliquid facilis ipsum. Unde necessitatibus provident minus.';
-
-describe('Modal', () => {
- it('renders a title', () => {
- const level = 2;
-
- render(
- <Modal heading={<Heading level={level}>{title}</Heading>}>
- {children}
- </Modal>
- );
- expect(rtlScreen.getByRole('heading', { level })).toHaveTextContent(title);
- });
-
- it('renders the modal body', () => {
- render(<Modal>{children}</Modal>);
- expect(rtlScreen.getByText(children)).toBeInTheDocument();
- });
-});