Removed borders on workspace container (#171)

* Wip

* Added mocks on main App story and fixed small mock bugs

* Removed borders on WorkspaceContainer
This commit is contained in:
Lucas Bordeau
2023-06-01 12:01:27 +02:00
committed by GitHub
parent 621c3c3213
commit 52582124f9
8 changed files with 133 additions and 27 deletions

View File

@ -2,32 +2,20 @@ import type { Meta, StoryObj } from '@storybook/react';
import { RecoilRoot } from 'recoil';
import { ThemeProvider } from '@emotion/react';
import { MemoryRouter } from 'react-router-dom';
import { ApolloClient, ApolloProvider, InMemoryCache } from '@apollo/client';
import { ApolloProvider } from '@apollo/client';
import App from '../App';
import { FullHeightStorybookLayout } from '../testing/FullHeightStorybookLayout';
import { lightTheme } from '../layout/styles/themes';
import { mockedClient } from '../testing/mockedClient';
import { graphqlMocks } from '../testing/graphqlMocks';
import { mockedUserJWT } from '../testing/mock-data/jwt';
const meta: Meta<typeof App> = {
title: 'App/App',
component: App,
};
const mockedClient = new ApolloClient({
uri: process.env.REACT_APP_API_URL,
cache: new InMemoryCache(),
defaultOptions: {
watchQuery: {
fetchPolicy: 'no-cache',
errorPolicy: 'all',
},
query: {
fetchPolicy: 'no-cache',
errorPolicy: 'all',
},
},
});
export default meta;
type Story = StoryObj<typeof App>;
@ -49,10 +37,13 @@ export const Default: Story = {
render,
loaders: [
async () => ({
accessTokenStored: await window.localStorage.setItem(
accessTokenStored: window.localStorage.setItem(
'accessToken',
'test-token',
mockedUserJWT,
),
}),
],
parameters: {
msw: graphqlMocks,
},
};