Skip to content

Commit

Permalink
docs: add Settings/Integrations/Integration Detail page stories
Browse files Browse the repository at this point in the history
  • Loading branch information
thaisguigon committed Mar 25, 2024
1 parent c846143 commit 1b569b5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { Meta, StoryObj } from '@storybook/react';

import { getSettingsPagePath } from '@/settings/utils/getSettingsPagePath';
import { SettingsPath } from '@/types/SettingsPath';
import { SettingsIntegrationDetail } from '~/pages/settings/integrations/SettingsIntegrationDetail';
import {
PageDecorator,
PageDecoratorArgs,
} from '~/testing/decorators/PageDecorator';
import { graphqlMocks } from '~/testing/graphqlMocks';

const meta: Meta<PageDecoratorArgs> = {
title: 'Pages/Settings/Integrations/SettingsIntegrationDetail',
component: SettingsIntegrationDetail,
decorators: [PageDecorator],
args: {
routePath: getSettingsPagePath(SettingsPath.IntegrationDetail),
routeParams: { ':integrationKey': 'postgresql' },
},
parameters: {
msw: graphqlMocks,
},
};

export default meta;

export type Story = StoryObj<typeof SettingsIntegrationDetail>;

export const Default: Story = {};
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { Meta, StoryObj } from '@storybook/react';
import { within } from '@storybook/test';

import { getSettingsPagePath } from '@/settings/utils/getSettingsPagePath';
import { SettingsPath } from '@/types/SettingsPath';
import { SettingsIntegrations } from '~/pages/settings/integrations/SettingsIntegrations';
import {
PageDecorator,
Expand All @@ -13,7 +15,7 @@ const meta: Meta<PageDecoratorArgs> = {
title: 'Pages/Settings/Integrations/SettingsIntegrations',
component: SettingsIntegrations,
decorators: [PageDecorator],
args: { routePath: '/settings/integrations' },
args: { routePath: getSettingsPagePath(SettingsPath.Integrations) },
parameters: {
msw: graphqlMocks,
},
Expand Down

0 comments on commit 1b569b5

Please sign in to comment.