From 1d162d7aafb3cfe2c3351b5fd891bbf6d476e9b2 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 14 Apr 2022 19:25:46 +0200
Subject: chore: add a Settings component

---
 src/components/organisms/toolbar/settings.test.tsx | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 src/components/organisms/toolbar/settings.test.tsx

(limited to 'src/components/organisms/toolbar/settings.test.tsx')

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();
+  });
+});
-- 
cgit v1.2.3

