mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix: disable unstable snapshot (#3791)
This commit is contained in:
@@ -7,6 +7,9 @@ import { within } from '@storybook/testing-library';
|
|||||||
export default {
|
export default {
|
||||||
title: 'AFFiNE/Breadcrumbs',
|
title: 'AFFiNE/Breadcrumbs',
|
||||||
component: Breadcrumbs,
|
component: Breadcrumbs,
|
||||||
|
parameters: {
|
||||||
|
chromatic: { disableSnapshot: true },
|
||||||
|
},
|
||||||
} as Meta<typeof Breadcrumbs>;
|
} as Meta<typeof Breadcrumbs>;
|
||||||
|
|
||||||
const Template: StoryFn = args => <Breadcrumbs {...args} />;
|
const Template: StoryFn = args => <Breadcrumbs {...args} />;
|
||||||
|
|||||||
@@ -9,11 +9,15 @@ import {
|
|||||||
HelpIcon,
|
HelpIcon,
|
||||||
PageIcon,
|
PageIcon,
|
||||||
} from '@blocksuite/icons';
|
} from '@blocksuite/icons';
|
||||||
|
import type { Meta } from '@storybook/react';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'AFFiNE/Card',
|
title: 'AFFiNE/Card',
|
||||||
component: WorkspaceCard,
|
component: WorkspaceCard,
|
||||||
};
|
parameters: {
|
||||||
|
chromatic: { disableSnapshot: true },
|
||||||
|
},
|
||||||
|
} satisfies Meta;
|
||||||
|
|
||||||
const blockSuiteWorkspace = getOrCreateWorkspace(
|
const blockSuiteWorkspace = getOrCreateWorkspace(
|
||||||
'blocksuite-local',
|
'blocksuite-local',
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ import type { Meta } from '@storybook/react';
|
|||||||
export default {
|
export default {
|
||||||
title: 'AFFiNE/ImportPage',
|
title: 'AFFiNE/ImportPage',
|
||||||
component: ImportPage,
|
component: ImportPage,
|
||||||
|
parameters: {
|
||||||
|
chromatic: { disableSnapshot: true },
|
||||||
|
},
|
||||||
} satisfies Meta;
|
} satisfies Meta;
|
||||||
|
|
||||||
const Template: StoryFn<typeof ImportPage> = args => <ImportPage {...args} />;
|
const Template: StoryFn<typeof ImportPage> = args => <ImportPage {...args} />;
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ import { useAtomValue, useSetAtom } from 'jotai';
|
|||||||
export default {
|
export default {
|
||||||
title: 'AFFiNE/NotificationCenter',
|
title: 'AFFiNE/NotificationCenter',
|
||||||
component: NotificationCenter,
|
component: NotificationCenter,
|
||||||
|
parameters: {
|
||||||
|
chromatic: { disableSnapshot: true },
|
||||||
|
},
|
||||||
} satisfies Meta<typeof NotificationCenter>;
|
} satisfies Meta<typeof NotificationCenter>;
|
||||||
|
|
||||||
let id = 0;
|
let id = 0;
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
/* deepscan-disable USELESS_ARROW_FUNC_BIND */
|
/* deepscan-disable USELESS_ARROW_FUNC_BIND */
|
||||||
import { TourModal } from '@affine/component/tour-modal';
|
import { TourModal } from '@affine/component/tour-modal';
|
||||||
import type { StoryFn } from '@storybook/react';
|
import type { Meta, StoryFn } from '@storybook/react';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'AFFiNE/TourModal',
|
title: 'AFFiNE/TourModal',
|
||||||
component: TourModal,
|
component: TourModal,
|
||||||
};
|
parameters: {
|
||||||
|
chromatic: { disableSnapshot: true },
|
||||||
|
},
|
||||||
|
} satisfies Meta;
|
||||||
|
|
||||||
export const Basic: StoryFn = () => {
|
export const Basic: StoryFn = () => {
|
||||||
return <TourModal open={true} onClose={() => {}} />;
|
return <TourModal open={true} onClose={() => {}} />;
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ import type { Meta } from '@storybook/react';
|
|||||||
export default {
|
export default {
|
||||||
title: 'AFFiNE/PageDetailSkeleton',
|
title: 'AFFiNE/PageDetailSkeleton',
|
||||||
component: PageDetailSkeleton,
|
component: PageDetailSkeleton,
|
||||||
|
parameters: {
|
||||||
|
chromatic: { disableSnapshot: true },
|
||||||
|
},
|
||||||
} satisfies Meta<typeof PageDetailSkeleton>;
|
} satisfies Meta<typeof PageDetailSkeleton>;
|
||||||
|
|
||||||
export const Basic = () => {
|
export const Basic = () => {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { NewPageButton } from '@affine/component/page-list';
|
|||||||
import { OperationCell } from '@affine/component/page-list';
|
import { OperationCell } from '@affine/component/page-list';
|
||||||
import { PageIcon } from '@blocksuite/icons';
|
import { PageIcon } from '@blocksuite/icons';
|
||||||
import { expect } from '@storybook/jest';
|
import { expect } from '@storybook/jest';
|
||||||
import type { StoryFn } from '@storybook/react';
|
import type { Meta, StoryFn } from '@storybook/react';
|
||||||
import { userEvent } from '@storybook/testing-library';
|
import { userEvent } from '@storybook/testing-library';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -16,7 +16,7 @@ export default {
|
|||||||
parameters: {
|
parameters: {
|
||||||
chromatic: { disableSnapshot: true },
|
chromatic: { disableSnapshot: true },
|
||||||
},
|
},
|
||||||
};
|
} satisfies Meta;
|
||||||
|
|
||||||
export const AffineOperationCell: StoryFn<OperationCellProps> = ({
|
export const AffineOperationCell: StoryFn<OperationCellProps> = ({
|
||||||
...props
|
...props
|
||||||
|
|||||||
@@ -12,14 +12,17 @@ import { WorkspaceFlavour } from '@affine/env/workspace';
|
|||||||
import { getOrCreateWorkspace } from '@affine/workspace/manager';
|
import { getOrCreateWorkspace } from '@affine/workspace/manager';
|
||||||
import type { Page } from '@blocksuite/store';
|
import type { Page } from '@blocksuite/store';
|
||||||
import { expect } from '@storybook/jest';
|
import { expect } from '@storybook/jest';
|
||||||
import type { StoryFn } from '@storybook/react';
|
import type { Meta, StoryFn } from '@storybook/react';
|
||||||
import { use } from 'foxact/use';
|
import { use } from 'foxact/use';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'AFFiNE/ShareMenu',
|
title: 'AFFiNE/ShareMenu',
|
||||||
component: ShareMenu,
|
component: ShareMenu,
|
||||||
};
|
parameters: {
|
||||||
|
chromatic: { disableSnapshot: true },
|
||||||
|
},
|
||||||
|
} satisfies Meta;
|
||||||
|
|
||||||
async function initPage(page: Page) {
|
async function initPage(page: Page) {
|
||||||
await page.waitForLoaded();
|
await page.waitForLoaded();
|
||||||
|
|||||||
@@ -1,11 +1,14 @@
|
|||||||
/* deepscan-disable USELESS_ARROW_FUNC_BIND */
|
/* deepscan-disable USELESS_ARROW_FUNC_BIND */
|
||||||
import { Switch } from '@affine/component';
|
import { Switch } from '@affine/component';
|
||||||
import type { StoryFn } from '@storybook/react';
|
import type { Meta, StoryFn } from '@storybook/react';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
title: 'AFFiNE/Switch',
|
title: 'AFFiNE/Switch',
|
||||||
component: Switch,
|
component: Switch,
|
||||||
};
|
parameters: {
|
||||||
|
chromatic: { disableSnapshot: true },
|
||||||
|
},
|
||||||
|
} satisfies Meta;
|
||||||
|
|
||||||
export const Basic: StoryFn = () => {
|
export const Basic: StoryFn = () => {
|
||||||
return <Switch>Switch</Switch>;
|
return <Switch>Switch</Switch>;
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
parameters: {
|
||||||
|
chromatic: { disableSnapshot: true },
|
||||||
|
},
|
||||||
} satisfies Meta<WorkspaceAvatarProps>;
|
} satisfies Meta<WorkspaceAvatarProps>;
|
||||||
|
|
||||||
const schema = new Schema();
|
const schema = new Schema();
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ import { useState } from 'react';
|
|||||||
export default {
|
export default {
|
||||||
title: 'AFFiNE/WorkspaceList',
|
title: 'AFFiNE/WorkspaceList',
|
||||||
component: WorkspaceList,
|
component: WorkspaceList,
|
||||||
|
parameters: {
|
||||||
|
chromatic: { disableSnapshot: true },
|
||||||
|
},
|
||||||
} satisfies Meta<WorkspaceListProps>;
|
} satisfies Meta<WorkspaceListProps>;
|
||||||
|
|
||||||
export const Default = () => {
|
export const Default = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user