summaryrefslogtreecommitdiffstats
path: root/src/components/organisms/toolbar/settings.test.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/organisms/toolbar/settings.test.tsx')
-rw-r--r--src/components/organisms/toolbar/settings.test.tsx32
1 files changed, 32 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..7ccb234
--- /dev/null
+++ b/src/components/organisms/toolbar/settings.test.tsx
@@ -0,0 +1,32 @@
+import { render, screen } from '@test-utils';
+import Settings from './settings';
+
+describe('Settings', () => {
+ it('renders a button to open settings modal', () => {
+ render(
+ <Settings
+ ackeeStorageKey="ackee-tracking"
+ motionStorageKey="reduced-motion"
+ isActive={false}
+ setIsActive={() => null}
+ />
+ );
+ expect(
+ screen.getByRole('checkbox', { name: 'Open settings' })
+ ).toBeInTheDocument();
+ });
+
+ it('renders a button to close settings modal', () => {
+ render(
+ <Settings
+ ackeeStorageKey="ackee-tracking"
+ motionStorageKey="reduced-motion"
+ isActive={true}
+ setIsActive={() => null}
+ />
+ );
+ expect(
+ screen.getByRole('checkbox', { name: 'Close settings' })
+ ).toBeInTheDocument();
+ });
+});