Skip to content

Commit

Permalink
fix(test): Unflake LCP test
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed Sep 20, 2024
1 parent 216aaeb commit 56c0c2f
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ sentryTest(
);

const url = await getLocalTestPath({ testDir: __dirname });
const [eventData] = await Promise.all([
getFirstSentryEnvelopeRequest<Event>(page),
page.goto(url),
page.click('button'),
]);

const eventDataPromise = getFirstSentryEnvelopeRequest<Event>(page);

await page.goto(url);
await page.click('button');

const eventData = await eventDataPromise;

expect(eventData.measurements).toBeDefined();
expect(eventData.measurements?.lcp?.value).toBeDefined();
Expand Down

0 comments on commit 56c0c2f

Please sign in to comment.