Add storybook tests for User & Metadata loading (#5650)
### Description Add storybook tests for User & Metadata loading ### Refs #5590 ### Demo https://github.com/twentyhq/twenty/assets/140154534/2434fc50-8d95-420b-9f62-6fbdf43ce9e5 Fixes #5590 --------- Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com> Co-authored-by: v1b3m <vibenjamin6@gmail.com> Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
This commit is contained in:
@ -5,7 +5,6 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
import { SettingsAccounts } from '../SettingsAccounts';
|
||||
@ -13,7 +12,7 @@ import { SettingsAccounts } from '../SettingsAccounts';
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsAccounts',
|
||||
component: SettingsAccounts,
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
args: {
|
||||
routePath: '/settings/accounts',
|
||||
},
|
||||
|
||||
@ -7,7 +7,6 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { sleep } from '~/testing/sleep';
|
||||
|
||||
@ -16,7 +15,7 @@ import { SettingsAccountsCalendars } from '../SettingsAccountsCalendars';
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsAccountsCalendars',
|
||||
component: SettingsAccountsCalendars,
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
args: {
|
||||
routePath: getSettingsPagePath(SettingsPath.AccountsCalendars),
|
||||
},
|
||||
|
||||
@ -8,7 +8,6 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { mockedConnectedAccounts } from '~/testing/mock-data/accounts';
|
||||
import { sleep } from '~/testing/sleep';
|
||||
@ -18,7 +17,7 @@ import { SettingsAccountsCalendarsSettings } from '../SettingsAccountsCalendarsS
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsAccountsCalendarsSettings',
|
||||
component: SettingsAccountsCalendarsSettings,
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
args: {
|
||||
routePath: getSettingsPagePath(SettingsPath.AccountsCalendarsSettings),
|
||||
routeParams: { ':accountUuid': mockedConnectedAccounts[0].id },
|
||||
|
||||
@ -4,7 +4,6 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
import { SettingsAccountsEmails } from '../SettingsAccountsEmails';
|
||||
@ -12,7 +11,7 @@ import { SettingsAccountsEmails } from '../SettingsAccountsEmails';
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsAccountsEmails',
|
||||
component: SettingsAccountsEmails,
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
args: {
|
||||
routePath: '/settings/accounts/emails',
|
||||
},
|
||||
|
||||
@ -7,13 +7,12 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsAccountsEmailsInboxSettings',
|
||||
component: SettingsAccountsEmailsInboxSettings,
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
args: {
|
||||
routePath: '/settings/accounts/emails/:accountUuid',
|
||||
routeParams: { ':accountUuid': '123' },
|
||||
|
||||
@ -5,13 +5,12 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Accounts/SettingsNewAccount',
|
||||
component: SettingsNewAccount,
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
args: {
|
||||
routePath: '/settings/accounts/new',
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user