Fix Frontend modules tests (#2688)

* Fix naming issue

Co-authored-by: gitstart-twenty <twenty@gitstart.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

* Fix more tests

Co-authored-by: gitstart-twenty <twenty@gitstart.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

* Revert unnecessary changes

Co-authored-by: gitstart-twenty <twenty@gitstart.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

* Refactor according to self-review

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: gitstart-twenty <twenty@gitstart.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>

* Fix graphql mocks not working anymore

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
gitstart-twenty
2023-11-29 04:18:34 +05:45
committed by GitHub
parent fd969de311
commit 0fa55b0634
25 changed files with 693 additions and 313 deletions

View File

@ -7,6 +7,8 @@ import { useCommandMenu } from '@/command-menu/hooks/useCommandMenu';
import { CommandType } from '@/command-menu/types/Command';
import { IconCheckbox, IconNotes } from '@/ui/display/icon';
import { ComponentWithRouterDecorator } from '~/testing/decorators/ComponentWithRouterDecorator';
import { ObjectMetadataItemsDecorator } from '~/testing/decorators/ObjectMetadataItemsDecorator';
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';
import { sleep } from '~/testing/sleep';
@ -18,6 +20,7 @@ const meta: Meta<typeof CommandMenu> = {
title: 'Modules/CommandMenu/CommandMenu',
component: CommandMenu,
decorators: [
ObjectMetadataItemsDecorator,
ComponentWithRouterDecorator,
(Story) => {
const { addToCommandMenu, setToIntitialCommandMenu, toggleCommandMenu } =
@ -48,6 +51,7 @@ const meta: Meta<typeof CommandMenu> = {
return <Story />;
},
SnackBarDecorator,
],
parameters: {
msw: graphqlMocks,