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:
gitstart-twenty
2024-06-04 04:51:33 -04:00
committed by GitHub
parent 3f9f2c3ba6
commit cd9ac529a5
44 changed files with 175 additions and 95 deletions

View File

@ -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' },

View File

@ -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: {

View File

@ -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' },

View File

@ -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: {

View File

@ -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,