Fix Icon Lazy Loading (#2984)

Fix Icon picker
This commit is contained in:
Charles Bochet
2023-12-14 12:13:02 +01:00
committed by GitHub
parent ed2cd408bf
commit 8916dee352
33 changed files with 4366 additions and 192 deletions

View File

@ -1,16 +1,12 @@
import { getOperationName } from '@apollo/client/utilities';
import { Meta, StoryObj } from '@storybook/react';
import { within } from '@storybook/test';
import { graphql } from 'msw';
import { AppPath } from '@/types/AppPath';
import {
PageDecorator,
PageDecoratorArgs,
} from '~/testing/decorators/PageDecorator';
import { mockedOnboardingUsersData } from '~/testing/mock-data/users';
import { GET_CURRENT_USER } from '../../../modules/users/graphql/queries/getCurrentUser';
import { CreateProfile } from '../CreateProfile';
const meta: Meta<PageDecoratorArgs> = {
@ -18,20 +14,7 @@ const meta: Meta<PageDecoratorArgs> = {
component: CreateProfile,
decorators: [PageDecorator],
args: { routePath: AppPath.CreateProfile },
parameters: {
msw: [
graphql.query(
getOperationName(GET_CURRENT_USER) ?? '',
(req, res, ctx) => {
return res(
ctx.data({
currentUser: mockedOnboardingUsersData[1],
}),
);
},
),
],
},
parameters: {},
};
export default meta;

View File

@ -1,16 +1,12 @@
import { getOperationName } from '@apollo/client/utilities';
import { Meta, StoryObj } from '@storybook/react';
import { within } from '@storybook/test';
import { graphql } from 'msw';
import { AppPath } from '@/types/AppPath';
import {
PageDecorator,
PageDecoratorArgs,
} from '~/testing/decorators/PageDecorator';
import { mockedOnboardingUsersData } from '~/testing/mock-data/users';
import { GET_CURRENT_USER } from '../../../modules/users/graphql/queries/getCurrentUser';
import { CreateWorkspace } from '../CreateWorkspace';
const meta: Meta<PageDecoratorArgs> = {
@ -19,18 +15,7 @@ const meta: Meta<PageDecoratorArgs> = {
decorators: [PageDecorator],
args: { routePath: AppPath.CreateWorkspace },
parameters: {
msw: [
graphql.query(
getOperationName(GET_CURRENT_USER) ?? '',
(req, res, ctx) => {
return res(
ctx.data({
currentUser: mockedOnboardingUsersData[0],
}),
);
},
),
],
msw: [],
},
};