Skip to content

Commit c02f2ff

Browse files
committed
Add extra time to sleep function to ensure video updated
1 parent b2a7934 commit c02f2ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dotcom-rendering/src/components/LoopVideo.stories.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ export const InteractionObserver: Story = {
100100
play: async ({ canvasElement }) => {
101101
const canvas = within(canvasElement);
102102

103-
await sleep(300); // Allow enough time for the autoplay video to start.
103+
await sleep(500); // Allow enough time for the autoplay video to start.
104104
canvas.getByTestId('page-end').scrollIntoView();
105105

106106
const progressBar = await canvas.findByRole('progressbar');
107107
const progress = Number(progressBar.ariaValueNow);
108108

109-
await sleep(200); // Allow enough time to be confident that the video is paused.
109+
await sleep(500); // Allow enough time to be confident that the video is paused.
110110
await expect(Number(progressBar.ariaValueNow)).toEqual(progress);
111111
await expect(canvas.queryByTestId('play-icon')).not.toBeInTheDocument();
112112
},

0 commit comments

Comments
 (0)