diff options
| author | Armand Philippot <git@armandphilippot.com> | 2023-10-26 21:55:55 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2023-11-11 18:15:27 +0100 |
| commit | 3ab9f0423e97af63da4bf6a13ffd786955bd5b3b (patch) | |
| tree | 53866337f2e2b0bd47ada82f0f35799595663108 /src/components/organisms/modals/settings-modal.test.tsx | |
| parent | 795b92cc1a168c48c7710ca6e0e1ef5974013d95 (diff) | |
refactor(hooks,providers): rewrite useAckee hook and AckeeProvider
Diffstat (limited to 'src/components/organisms/modals/settings-modal.test.tsx')
| -rw-r--r-- | src/components/organisms/modals/settings-modal.test.tsx | 31 |
1 files changed, 10 insertions, 21 deletions
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(); }); }); |
