From b61d8d2724552f73c1e8e7d4ec018870e7861ef8 Mon Sep 17 00:00:00 2001 From: Alice Khoudli Date: Fri, 22 Nov 2024 21:27:19 +0100 Subject: [PATCH] front: fix flaky scroll container selection in e2e tests Signed-off-by: Alice Khoudli --- front/tests/utils/scrollHelper.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/front/tests/utils/scrollHelper.ts b/front/tests/utils/scrollHelper.ts index 5040ee6195e..69ad5c3667d 100644 --- a/front/tests/utils/scrollHelper.ts +++ b/front/tests/utils/scrollHelper.ts @@ -20,6 +20,7 @@ const scrollContainer = async ( { stepSize = 300, timeout = 20, scrollOffsetThreshold = 200 }: ScrollOptions = {} ): Promise => { // Locate the scrollable container on the page + await page.waitForSelector(containerSelector, { state: 'visible' }); const container = await page.evaluateHandle( (selector: string) => document.querySelector(selector), containerSelector