mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-19 09:31:44 +03:00
9648b13703
* Fix Frontend pages tests Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com> * Add SnackBarDecorator Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com> * Fix more tests Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com> * Fix more tests Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: gitstart-twenty <twenty@gitstart.com> Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com> --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: Mael FOSSO <fosso.mael.elvis@gmail.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com>
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
import { HelmetProvider } from 'react-helmet-async';
|
|
import { MemoryRouter } from 'react-router-dom';
|
|
import { Meta, StoryObj } from '@storybook/react';
|
|
|
|
import { ClientConfigProvider } from '@/client-config/components/ClientConfigProvider';
|
|
import { UserProvider } from '@/users/components/UserProvider';
|
|
import { App } from '~/App';
|
|
import { SnackBarDecorator } from '~/testing/decorators/SnackBarDecorator';
|
|
import { FullHeightStorybookLayout } from '~/testing/FullHeightStorybookLayout';
|
|
import { graphqlMocks } from '~/testing/graphqlMocks';
|
|
|
|
const meta: Meta<typeof App> = {
|
|
title: 'App/App',
|
|
component: App,
|
|
decorators: [
|
|
SnackBarDecorator,
|
|
(Story) => (
|
|
<ClientConfigProvider>
|
|
<UserProvider>
|
|
<MemoryRouter>
|
|
<FullHeightStorybookLayout>
|
|
<HelmetProvider>
|
|
<Story />
|
|
</HelmetProvider>
|
|
</FullHeightStorybookLayout>
|
|
</MemoryRouter>
|
|
</UserProvider>
|
|
</ClientConfigProvider>
|
|
),
|
|
],
|
|
parameters: {
|
|
msw: graphqlMocks,
|
|
},
|
|
};
|
|
|
|
export default meta;
|
|
export type Story = StoryObj<typeof App>;
|
|
|
|
export const Default: Story = {};
|
|
|
|
export const DarkMode: Story = {
|
|
parameters: {
|
|
theming: {
|
|
themeOverride: 'dark',
|
|
},
|
|
},
|
|
};
|