diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-14 19:25:46 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-14 19:25:46 +0200 |
| commit | 1d162d7aafb3cfe2c3351b5fd891bbf6d476e9b2 (patch) | |
| tree | c263967fcb9f0fdaa2f665b0471091dfcc62b34e /src/components/organisms/toolbar/settings.test.tsx | |
| parent | 15fd9f4a6ecf947c7648c6b7865b97c40124fde1 (diff) | |
chore: add a Settings component
Diffstat (limited to 'src/components/organisms/toolbar/settings.test.tsx')
| -rw-r--r-- | src/components/organisms/toolbar/settings.test.tsx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/components/organisms/toolbar/settings.test.tsx b/src/components/organisms/toolbar/settings.test.tsx new file mode 100644 index 0000000..96a32c9 --- /dev/null +++ b/src/components/organisms/toolbar/settings.test.tsx @@ -0,0 +1,18 @@ +import { render, screen } from '@test-utils'; +import Settings from './settings'; + +describe('Settings', () => { + it('renders a button to open settings modal', () => { + render(<Settings isActive={false} setIsActive={() => null} />); + expect( + screen.getByRole('checkbox', { name: 'Open settings' }) + ).toBeInTheDocument(); + }); + + it('renders a button to close settings modal', () => { + render(<Settings isActive={true} setIsActive={() => null} />); + expect( + screen.getByRole('checkbox', { name: 'Close settings' }) + ).toBeInTheDocument(); + }); +}); |
