mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 19:11:08 +08:00
Remove chromatic ignore attributes, instead just don't run the play function
This commit is contained in:
parent
a5762c99cd
commit
49bdd7b434
@ -6,6 +6,7 @@ import { CallStates } from '@storybook/instrumenter';
|
||||
import { styled } from '@storybook/theming';
|
||||
import { userEvent, within, waitFor } from '@storybook/testing-library';
|
||||
import { expect } from '@storybook/jest';
|
||||
import isChromatic from 'chromatic/isChromatic';
|
||||
|
||||
import { getCalls, getInteractions } from '../mocks';
|
||||
import { InteractionsPanel } from './InteractionsPanel';
|
||||
@ -62,6 +63,7 @@ export const Passing: Story = {
|
||||
},
|
||||
};
|
||||
Passing.play = async ({ args, canvasElement }) => {
|
||||
if (isChromatic()) return;
|
||||
const canvas = within(canvasElement);
|
||||
|
||||
await waitFor(async () => {
|
||||
|
@ -129,10 +129,7 @@ export const Subnav: React.FC<SubnavProps> = ({
|
||||
|
||||
<StyledSeparator />
|
||||
|
||||
<WithTooltip
|
||||
hasChrome={false}
|
||||
tooltip={<Note note="Go to start" data-chromatic="ignore" />}
|
||||
>
|
||||
<WithTooltip hasChrome={false} tooltip={<Note note="Go to start" />}>
|
||||
<RewindButton
|
||||
aria-label="Go to start"
|
||||
containsIcon
|
||||
@ -143,10 +140,7 @@ export const Subnav: React.FC<SubnavProps> = ({
|
||||
</RewindButton>
|
||||
</WithTooltip>
|
||||
|
||||
<WithTooltip
|
||||
hasChrome={false}
|
||||
tooltip={<Note note="Go back" data-chromatic="ignore" />}
|
||||
>
|
||||
<WithTooltip hasChrome={false} tooltip={<Note note="Go back" />}>
|
||||
<StyledIconButton
|
||||
aria-label="Go back"
|
||||
containsIcon
|
||||
@ -157,10 +151,7 @@ export const Subnav: React.FC<SubnavProps> = ({
|
||||
</StyledIconButton>
|
||||
</WithTooltip>
|
||||
|
||||
<WithTooltip
|
||||
hasChrome={false}
|
||||
tooltip={<Note note="Go forward" data-chromatic="ignore" />}
|
||||
>
|
||||
<WithTooltip hasChrome={false} tooltip={<Note note="Go forward" />}>
|
||||
<StyledIconButton
|
||||
aria-label="Go forward"
|
||||
containsIcon
|
||||
@ -171,10 +162,7 @@ export const Subnav: React.FC<SubnavProps> = ({
|
||||
</StyledIconButton>
|
||||
</WithTooltip>
|
||||
|
||||
<WithTooltip
|
||||
hasChrome={false}
|
||||
tooltip={<Note note="Go to end" data-chromatic="ignore" />}
|
||||
>
|
||||
<WithTooltip hasChrome={false} tooltip={<Note note="Go to end" />}>
|
||||
<StyledIconButton
|
||||
aria-label="Go to end"
|
||||
containsIcon
|
||||
@ -185,7 +173,7 @@ export const Subnav: React.FC<SubnavProps> = ({
|
||||
</StyledIconButton>
|
||||
</WithTooltip>
|
||||
|
||||
<WithTooltip hasChrome={false} tooltip={<Note note="Rerun" data-chromatic="ignore" />}>
|
||||
<WithTooltip hasChrome={false} tooltip={<Note note="Rerun" />}>
|
||||
<RerunButton
|
||||
aria-label="Rerun"
|
||||
containsIcon
|
||||
|
Loading…
x
Reference in New Issue
Block a user