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:
@ -8,14 +8,13 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { sleep } from '~/testing/sleep';
|
||||
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Integrations/SettingsIntegrationDatabase',
|
||||
component: SettingsIntegrationDatabase,
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
args: {
|
||||
routePath: getSettingsPagePath(SettingsPath.IntegrationDatabase),
|
||||
routeParams: { ':databaseKey': 'postgresql' },
|
||||
|
||||
@ -6,7 +6,6 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { sleep } from '~/testing/sleep';
|
||||
|
||||
@ -14,7 +13,7 @@ const meta: Meta<PageDecoratorArgs> = {
|
||||
title:
|
||||
'Pages/Settings/Integrations/SettingsIntegrationEditDatabaseConnection',
|
||||
component: SettingsIntegrationEditDatabaseConnection,
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
args: {
|
||||
routePath: '/settings/integrations/:databaseKey/edit',
|
||||
routeParams: {
|
||||
|
||||
@ -6,14 +6,13 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { sleep } from '~/testing/sleep';
|
||||
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Integrations/SettingsIntegrationNewDatabaseConnection',
|
||||
component: SettingsIntegrationNewDatabaseConnection,
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
args: {
|
||||
routePath: '/settings/integrations/:databaseKey/new',
|
||||
routeParams: { ':databaseKey': 'postgresql' },
|
||||
|
||||
@ -8,7 +8,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 @@ const meta: Meta<PageDecoratorArgs> = {
|
||||
title:
|
||||
'Pages/Settings/Integrations/SettingsIntegrationShowDatabaseConnection',
|
||||
component: SettingsIntegrationShowDatabaseConnection,
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
args: {
|
||||
routePath: getSettingsPagePath(SettingsPath.IntegrationDatabaseConnection),
|
||||
routeParams: {
|
||||
|
||||
@ -8,14 +8,13 @@ import {
|
||||
PageDecorator,
|
||||
PageDecoratorArgs,
|
||||
} from '~/testing/decorators/PageDecorator';
|
||||
import { PrefetchLoadingDecorator } from '~/testing/decorators/PrefetchLoadingDecorator';
|
||||
import { graphqlMocks } from '~/testing/graphqlMocks';
|
||||
import { sleep } from '~/testing/sleep';
|
||||
|
||||
const meta: Meta<PageDecoratorArgs> = {
|
||||
title: 'Pages/Settings/Integrations/SettingsIntegrations',
|
||||
component: SettingsIntegrations,
|
||||
decorators: [PrefetchLoadingDecorator, PageDecorator],
|
||||
decorators: [PageDecorator],
|
||||
args: { routePath: getSettingsPagePath(SettingsPath.Integrations) },
|
||||
parameters: {
|
||||
msw: graphqlMocks,
|
||||
|
||||
Reference in New Issue
Block a user