fix: disable unstable snapshot (#3791)

This commit is contained in:
Alex Yang 2023-08-16 21:44:48 -05:00 committed by GitHub
parent 9d723fd487
commit 9853d0f6ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 40 additions and 9 deletions

View File

@ -7,6 +7,9 @@ import { within } from '@storybook/testing-library';
export default {
title: 'AFFiNE/Breadcrumbs',
component: Breadcrumbs,
parameters: {
chromatic: { disableSnapshot: true },
},
} as Meta<typeof Breadcrumbs>;
const Template: StoryFn = args => <Breadcrumbs {...args} />;

View File

@ -9,11 +9,15 @@ import {
HelpIcon,
PageIcon,
} from '@blocksuite/icons';
import type { Meta } from '@storybook/react';
export default {
title: 'AFFiNE/Card',
component: WorkspaceCard,
};
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta;
const blockSuiteWorkspace = getOrCreateWorkspace(
'blocksuite-local',

View File

@ -7,6 +7,9 @@ import type { Meta } from '@storybook/react';
export default {
title: 'AFFiNE/ImportPage',
component: ImportPage,
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta;
const Template: StoryFn<typeof ImportPage> = args => <ImportPage {...args} />;

View File

@ -9,6 +9,9 @@ import { useAtomValue, useSetAtom } from 'jotai';
export default {
title: 'AFFiNE/NotificationCenter',
component: NotificationCenter,
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta<typeof NotificationCenter>;
let id = 0;

View File

@ -1,11 +1,14 @@
/* deepscan-disable USELESS_ARROW_FUNC_BIND */
import { TourModal } from '@affine/component/tour-modal';
import type { StoryFn } from '@storybook/react';
import type { Meta, StoryFn } from '@storybook/react';
export default {
title: 'AFFiNE/TourModal',
component: TourModal,
};
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta;
export const Basic: StoryFn = () => {
return <TourModal open={true} onClose={() => {}} />;

View File

@ -4,6 +4,9 @@ import type { Meta } from '@storybook/react';
export default {
title: 'AFFiNE/PageDetailSkeleton',
component: PageDetailSkeleton,
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta<typeof PageDetailSkeleton>;
export const Basic = () => {

View File

@ -7,7 +7,7 @@ import { NewPageButton } from '@affine/component/page-list';
import { OperationCell } from '@affine/component/page-list';
import { PageIcon } from '@blocksuite/icons';
import { expect } from '@storybook/jest';
import type { StoryFn } from '@storybook/react';
import type { Meta, StoryFn } from '@storybook/react';
import { userEvent } from '@storybook/testing-library';
export default {
@ -16,7 +16,7 @@ export default {
parameters: {
chromatic: { disableSnapshot: true },
},
};
} satisfies Meta;
export const AffineOperationCell: StoryFn<OperationCellProps> = ({
...props

View File

@ -12,14 +12,17 @@ import { WorkspaceFlavour } from '@affine/env/workspace';
import { getOrCreateWorkspace } from '@affine/workspace/manager';
import type { Page } from '@blocksuite/store';
import { expect } from '@storybook/jest';
import type { StoryFn } from '@storybook/react';
import type { Meta, StoryFn } from '@storybook/react';
import { use } from 'foxact/use';
import { useState } from 'react';
export default {
title: 'AFFiNE/ShareMenu',
component: ShareMenu,
};
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta;
async function initPage(page: Page) {
await page.waitForLoaded();

View File

@ -1,11 +1,14 @@
/* deepscan-disable USELESS_ARROW_FUNC_BIND */
import { Switch } from '@affine/component';
import type { StoryFn } from '@storybook/react';
import type { Meta, StoryFn } from '@storybook/react';
export default {
title: 'AFFiNE/Switch',
component: Switch,
};
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta;
export const Basic: StoryFn = () => {
return <Switch>Switch</Switch>;

View File

@ -16,6 +16,9 @@ export default {
},
},
},
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta<WorkspaceAvatarProps>;
const schema = new Schema();

View File

@ -9,6 +9,9 @@ import { useState } from 'react';
export default {
title: 'AFFiNE/WorkspaceList',
component: WorkspaceList,
parameters: {
chromatic: { disableSnapshot: true },
},
} satisfies Meta<WorkspaceListProps>;
export const Default = () => {