Skip to content

Commit

Permalink
Fix storybook tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martmull committed Jun 10, 2024
1 parent 3395a94 commit d80a941
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getOperationName } from '@apollo/client/utilities';
import { Meta, StoryObj } from '@storybook/react';
import { within } from '@storybook/test';
import { graphql, HttpResponse } from 'msw';
import { OnboardingStep } from 'packages/twenty-front/src/generated/graphql';

import { AppPath } from '~/modules/types/AppPath';
import { GET_CURRENT_USER } from '~/modules/users/graphql/queries/getCurrentUser';
Expand All @@ -24,7 +25,10 @@ const meta: Meta<PageDecoratorArgs> = {
graphql.query(getOperationName(GET_CURRENT_USER) ?? '', () => {
return HttpResponse.json({
data: {
currentUser: mockedOnboardingUsersData[0],
currentUser: {
...mockedOnboardingUsersData[0],
onboardingStep: OnboardingStep.InviteTeam,
},
},
});
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getOperationName } from '@apollo/client/utilities';
import { Meta, StoryObj } from '@storybook/react';
import { within } from '@storybook/test';
import { graphql, HttpResponse } from 'msw';
import { OnboardingStep } from 'packages/twenty-front/src/generated/graphql';

import { AppPath } from '~/modules/types/AppPath';
import { GET_CURRENT_USER } from '~/modules/users/graphql/queries/getCurrentUser';
Expand All @@ -24,7 +25,10 @@ const meta: Meta<PageDecoratorArgs> = {
graphql.query(getOperationName(GET_CURRENT_USER) ?? '', () => {
return HttpResponse.json({
data: {
currentUser: mockedOnboardingUsersData[0],
currentUser: {
...mockedOnboardingUsersData[0],
onboardingStep: OnboardingStep.SyncEmail,
},
},
});
}),
Expand Down

0 comments on commit d80a941

Please sign in to comment.