From 4af74b6ecdc705de4ef7877d160b4ec5229e7913 Mon Sep 17 00:00:00 2001 From: Valentin Palkovic Date: Wed, 22 May 2024 10:50:08 +0200 Subject: [PATCH] Merge pull request #27225 from storybookjs/valentin/disable-snapshotting-for-stories Build: Exclude stories from snapshotting (cherry picked from commit fb255d9017e1e5e4a5212440ef6052f00df2cfeb) --- code/ui/blocks/src/blocks/Story.stories.tsx | 3 +++ code/ui/blocks/src/components/Story.stories.tsx | 3 +++ 2 files changed, 6 insertions(+) diff --git a/code/ui/blocks/src/blocks/Story.stories.tsx b/code/ui/blocks/src/blocks/Story.stories.tsx index b3f8108feb23..6dcd2bfa9fb7 100644 --- a/code/ui/blocks/src/blocks/Story.stories.tsx +++ b/code/ui/blocks/src/blocks/Story.stories.tsx @@ -171,6 +171,9 @@ export const WithInteractionsAutoplayInParameters: Story = { export const ForceInitialArgs: Story = { ...StoryComponentStories.ForceInitialArgs, + parameters: { + chromatic: { disableSnapshot: true }, + }, args: { of: ButtonStories.Primary, storyExport: ButtonStories.Primary, diff --git a/code/ui/blocks/src/components/Story.stories.tsx b/code/ui/blocks/src/components/Story.stories.tsx index fa1767d747af..b393a7e4614d 100644 --- a/code/ui/blocks/src/components/Story.stories.tsx +++ b/code/ui/blocks/src/components/Story.stories.tsx @@ -82,6 +82,9 @@ export const ForceInitialArgs = { forceInitialArgs: true, renderStoryToElement, }, + parameters: { + chromatic: { disableSnapshot: true }, + }, // test that it ignores updated args by emitting an arg update and assert that it isn't reflected in the DOM play: async ({ args, canvasElement, loaded }: PlayFunctionContext) => { const docsContext = loaded.docsContext as DocsContextProps;