From 43c29699f5b751b30c185039561e44dd1eaa3bcc Mon Sep 17 00:00:00 2001 From: Gianni Ferullo Date: Fri, 1 Nov 2024 11:21:32 -0400 Subject: [PATCH] react-components: fix cypress tests --- packages/react-components/cypress/utils/video-test-utils.ts | 4 ++-- packages/react-components/stories/gif.stories.tsx | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react-components/cypress/utils/video-test-utils.ts b/packages/react-components/cypress/utils/video-test-utils.ts index 8740a2ec..6792fd1b 100644 --- a/packages/react-components/cypress/utils/video-test-utils.ts +++ b/packages/react-components/cypress/utils/video-test-utils.ts @@ -93,10 +93,10 @@ export function checkVideoEvents(ctx: VideoTestUtilsContext) { .then(async (elems) => { const el = elems.get(0) await el.play() - return new Promise((resolve) => { + return new Promise((resolve) => { function listener() { el.removeEventListener('ended', listener) - resolve(null) + resolve() } el.addEventListener('ended', listener) }) diff --git a/packages/react-components/stories/gif.stories.tsx b/packages/react-components/stories/gif.stories.tsx index 1af63b49..32c3df3d 100644 --- a/packages/react-components/stories/gif.stories.tsx +++ b/packages/react-components/stories/gif.stories.tsx @@ -117,6 +117,7 @@ export const GifWithAd: Story = { export const GifThatStretches: Story = { args: { + id: 'sTczweWUTxLqg', percentWidth: '50%', }, }