From 66f8f7d3ae7221859350692f4e192c6fadf2ded7 Mon Sep 17 00:00:00 2001 From: KevinL10 Date: Mon, 8 Jul 2024 15:22:30 -0400 Subject: [PATCH] fix flakiness --- .../long-animation-frame-enabled/test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-enabled/test.ts b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-enabled/test.ts index d2dc2e45571b..1aa9b1543e34 100644 --- a/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-enabled/test.ts +++ b/dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/long-animation-frame-enabled/test.ts @@ -24,6 +24,8 @@ sentryTest( await page.goto(url); + await new Promise(resolve => setTimeout(resolve, 200)); + const eventData = await promise; const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui.long-animation-frame')); @@ -76,6 +78,8 @@ sentryTest( // trigger long animation frame function await page.getByRole('button').click(); + await new Promise(resolve => setTimeout(resolve, 200)); + const eventData = await promise; const uiSpans = eventData.spans?.filter(({ op }) => op?.startsWith('ui.long-animation-frame'));