Fix hotkeys blocking comments (#487)

* Fix hotkeys blocking comments

* Fix tests
This commit is contained in:
Charles Bochet
2023-07-01 02:09:49 +03:00
committed by GitHub
parent f08ff68530
commit 8684a8d517
16 changed files with 54 additions and 29 deletions

View File

@ -1,5 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react';
import { AuthModal } from '@/auth/components/ui/Modal';
import { AuthLayout } from '@/ui/layout/AuthLayout';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { getRenderWrapperForPage } from '~/testing/renderWrappers';
@ -15,7 +17,14 @@ export default meta;
export type Story = StoryObj<typeof Index>;
export const Default: Story = {
render: getRenderWrapperForPage(<Index />, '/auth'),
render: getRenderWrapperForPage(
<AuthLayout>
<AuthModal>
<Index />
</AuthModal>
</AuthLayout>,
'/auth',
),
parameters: {
msw: graphqlMocks,
},

View File

@ -1,5 +1,7 @@
import type { Meta, StoryObj } from '@storybook/react';
import { AuthModal } from '@/auth/components/ui/Modal';
import { AuthLayout } from '@/ui/layout/AuthLayout';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { getRenderWrapperForPage } from '~/testing/renderWrappers';
@ -15,7 +17,14 @@ export default meta;
export type Story = StoryObj<typeof PasswordLogin>;
export const Default: Story = {
render: getRenderWrapperForPage(<PasswordLogin />, '/auth/password-login'),
render: getRenderWrapperForPage(
<AuthLayout>
<AuthModal>
<PasswordLogin />
</AuthModal>
</AuthLayout>,
'/auth/password-login',
),
parameters: {
msw: graphqlMocks,
},