Skip to content

Commit

Permalink
fix: chromatic scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
dauriamarco committed Apr 4, 2024
1 parent 3c628e2 commit bd7a960
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/dialog/dialog/dialog.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ const hideHeader = async ({ canvasElement }: StoryContext): Promise<void> => {
await playStory({ canvasElement } as StoryContext);

// Scroll the content to hide the title.
canvas.getByTestId('content').shadowRoot?.firstElementChild?.scroll(0, 50);
await new Promise((resolve) => setTimeout(resolve, 500));
await new Promise((resolve) => setTimeout(resolve, 250));
setTimeout(() => canvas.getByTestId('image').scrollIntoView(), 250);
};

const level: InputType = {
Expand Down Expand Up @@ -283,6 +283,7 @@ const LongContentTemplate = ({
style=${styleMap({ 'margin-block': '1rem' })}
image-src=${sampleImages[1]}
alt="Natural landscape"
data-testid="image"
data-chromatic="ignore"
></sbb-image>
He stood still enchanted, while the sweet syllables of the elvish song fell like clear jewels
Expand Down

0 comments on commit bd7a960

Please sign in to comment.