Skip to content

Commit

Permalink
front: fix flaky scroll container selection in e2e tests
Browse files Browse the repository at this point in the history
Signed-off-by: Alice Khoudli <alice.khoudli@polytechnique.org>
  • Loading branch information
Synar committed Nov 22, 2024
1 parent 23c2391 commit b61d8d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions front/tests/utils/scrollHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const scrollContainer = async (
{ stepSize = 300, timeout = 20, scrollOffsetThreshold = 200 }: ScrollOptions = {}
): Promise<void> => {
// Locate the scrollable container on the page
await page.waitForSelector(containerSelector, { state: 'visible' });
const container = await page.evaluateHandle(
(selector: string) => document.querySelector(selector),
containerSelector
Expand Down

0 comments on commit b61d8d2

Please sign in to comment.