From d80a941ffa27b37eab6e43afd50c16fb77ff08c4 Mon Sep 17 00:00:00 2001 From: martmull Date: Mon, 10 Jun 2024 16:14:34 +0200 Subject: [PATCH] Fix storybook tests --- .../src/pages/onboarding/__stories__/InviteTeam.stories.tsx | 6 +++++- .../src/pages/onboarding/__stories__/SyncEmails.stories.tsx | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/twenty-front/src/pages/onboarding/__stories__/InviteTeam.stories.tsx b/packages/twenty-front/src/pages/onboarding/__stories__/InviteTeam.stories.tsx index 10aaa8c15a81..1ebab69909e8 100644 --- a/packages/twenty-front/src/pages/onboarding/__stories__/InviteTeam.stories.tsx +++ b/packages/twenty-front/src/pages/onboarding/__stories__/InviteTeam.stories.tsx @@ -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'; @@ -24,7 +25,10 @@ const meta: Meta = { graphql.query(getOperationName(GET_CURRENT_USER) ?? '', () => { return HttpResponse.json({ data: { - currentUser: mockedOnboardingUsersData[0], + currentUser: { + ...mockedOnboardingUsersData[0], + onboardingStep: OnboardingStep.InviteTeam, + }, }, }); }), diff --git a/packages/twenty-front/src/pages/onboarding/__stories__/SyncEmails.stories.tsx b/packages/twenty-front/src/pages/onboarding/__stories__/SyncEmails.stories.tsx index dce9aeb8d013..c785aeb04746 100644 --- a/packages/twenty-front/src/pages/onboarding/__stories__/SyncEmails.stories.tsx +++ b/packages/twenty-front/src/pages/onboarding/__stories__/SyncEmails.stories.tsx @@ -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'; @@ -24,7 +25,10 @@ const meta: Meta = { graphql.query(getOperationName(GET_CURRENT_USER) ?? '', () => { return HttpResponse.json({ data: { - currentUser: mockedOnboardingUsersData[0], + currentUser: { + ...mockedOnboardingUsersData[0], + onboardingStep: OnboardingStep.SyncEmail, + }, }, }); }),