From 3ab9f0423e97af63da4bf6a13ffd786955bd5b3b Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Thu, 26 Oct 2023 21:55:55 +0200
Subject: refactor(hooks,providers): rewrite useAckee hook and AckeeProvider

---
 .../organisms/modals/settings-modal.test.tsx       | 31 +++++++---------------
 1 file changed, 10 insertions(+), 21 deletions(-)

(limited to 'src/components/organisms/modals/settings-modal.test.tsx')

diff --git a/src/components/organisms/modals/settings-modal.test.tsx b/src/components/organisms/modals/settings-modal.test.tsx
index bb0cdf2..26d046a 100644
--- a/src/components/organisms/modals/settings-modal.test.tsx
+++ b/src/components/organisms/modals/settings-modal.test.tsx
@@ -1,41 +1,30 @@
 import { describe, expect, it } from '@jest/globals';
-import { render, screen } from '../../../../tests/utils';
-import { storageKey as ackeeStorageKey } from '../../organisms/forms/ackee-toggle/ackee-toggle.fixture';
-import { storageKey as motionStorageKey } from '../../organisms/forms/motion-toggle/motion-toggle.fixture';
+import { render, screen as rtlScreen } from '../../../../tests/utils';
+import { storageKey as motionStorageKey } from '../forms/motion-toggle/motion-toggle.fixture';
 import { SettingsModal } from './settings-modal';
 
 describe('SettingsModal', () => {
   it('renders the modal heading', () => {
-    render(
-      <SettingsModal
-        ackeeStorageKey={ackeeStorageKey}
-        motionStorageKey={motionStorageKey}
-      />
-    );
-    expect(screen.getByText(/Settings/i)).toBeInTheDocument();
+    render(<SettingsModal motionStorageKey={motionStorageKey} />);
+    expect(rtlScreen.getByText(/Settings/i)).toBeInTheDocument();
   });
 
   it('renders a settings form', () => {
-    render(
-      <SettingsModal
-        ackeeStorageKey={ackeeStorageKey}
-        motionStorageKey={motionStorageKey}
-      />
-    );
+    render(<SettingsModal motionStorageKey={motionStorageKey} />);
     expect(
-      screen.getByRole('form', { name: /^Settings form/i })
+      rtlScreen.getByRole('form', { name: /^Settings form/i })
     ).toBeInTheDocument();
     expect(
-      screen.getByRole('radiogroup', { name: /^Theme:/i })
+      rtlScreen.getByRole('radiogroup', { name: /^Theme:/i })
     ).toBeInTheDocument();
     expect(
-      screen.getByRole('radiogroup', { name: /^Code blocks:/i })
+      rtlScreen.getByRole('radiogroup', { name: /^Code blocks:/i })
     ).toBeInTheDocument();
     expect(
-      screen.getByRole('radiogroup', { name: /^Animations:/i })
+      rtlScreen.getByRole('radiogroup', { name: /^Animations:/i })
     ).toBeInTheDocument();
     expect(
-      screen.getByRole('radiogroup', { name: /^Tracking:/i })
+      rtlScreen.getByRole('radiogroup', { name: /^Tracking:/i })
     ).toBeInTheDocument();
   });
 });
-- 
cgit v1.2.3

