Skip to content

Commit 67c5a22

Browse files
committed
Maybe add a wait
1 parent ba26154 commit 67c5a22

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/PageLayout/interaction.stories.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ const isInViewPort = (boundingRect: {top: number; left: number; right: number; b
359359
StickyPane.play = async ({canvasElement}: {canvasElement: HTMLElement}) => {
360360
const canvas = within(canvasElement)
361361
const content3 = await canvas.getByTestId('content3')
362+
// Trying to see if waiting for a bit makes the test more obvious
363+
await new Promise(r => setTimeout(r, 1000))
362364
content3.scrollIntoView()
363365
const paragraph0 = await canvas.getByTestId('paragraph0')
364366
const paragraphRect = paragraph0.getBoundingClientRect()
@@ -387,6 +389,7 @@ NonStickyPane.argTypes = {
387389
NonStickyPane.play = async ({canvasElement}: {canvasElement: HTMLElement}) => {
388390
const canvas = within(canvasElement)
389391
const content3 = await canvas.getByTestId('content3')
392+
await new Promise(r => setTimeout(r, 1000))
390393
content3.scrollIntoView()
391394
const paragraph0 = await canvas.getByTestId('paragraph0')
392395
const paragraphRect = paragraph0.getBoundingClientRect()

0 commit comments

Comments
 (0)