Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions .bitmap

This file was deleted.

30 changes: 23 additions & 7 deletions .storybook/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ import { withKnobs } from '@storybook/addon-knobs';
import { withI18next } from 'storybook-addon-i18next';
import MockDate from 'mockdate';
import isChromatic from 'chromatic/isChromatic';
import { MuiPickersUtilsProvider } from '@material-ui/pickers';
import DateFnsUtils from '@date-io/date-fns';
import { SnackbarProvider } from 'notistack';
import { AppProvider } from '../src/components/App';
import { MockedProvider } from '@apollo/client/testing';
import TestRouter from '../tests/TestRouter';
import theme from '../src/theme';
import i18n from '../src/lib/i18n';

Expand All @@ -22,14 +28,24 @@ addDecorator(
},
}),
);

addDecorator((storyFn) => (
<ThemeProvider theme={theme}>
<CssBaseline />
{storyFn()}
</ThemeProvider>
));
addDecorator(withKnobs);
addDecorator((StoryFn) => (
<MockedProvider mocks={[]} addTypename={false}>
<ThemeProvider theme={theme}>
<CssBaseline />
<MuiPickersUtilsProvider utils={DateFnsUtils}>
<SnackbarProvider maxSnack={3}>
<TestRouter>
<AppProvider>
<StoryFn />
</AppProvider>
</TestRouter>
</SnackbarProvider>
</MuiPickersUtilsProvider>
</ThemeProvider>
</MockedProvider>
));

addParameters({ chromatic: { diffThreshold: true } });

// automatically import all files ending in *.stories.tsx
Expand Down
2 changes: 2 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,6 @@ module.exports = {
tsConfig: '<rootDir>/tsconfig.jest.json',
},
},
testEnvironment: 'jest-environment-jsdom-sixteen',
testTimeout: 10000,
};
2 changes: 2 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const withPWA = require('next-pwa');
const withOptimizedImages = require('next-optimized-images');
const withGraphql = require('next-plugin-graphql');

const prod = process.env.NODE_ENV === 'production';
let SiteUrl;

if (process.env.SITE_URL) {
Expand All @@ -19,6 +20,7 @@ module.exports = withPlugins([
{
pwa: {
dest: 'public',
disable: !prod,
},
},
],
Expand Down
Loading