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 21, 2024
1 parent 216aaeb commit a047e37
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.locator('button').click();

const eventData = await eventDataPromise;

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

0 comments on commit a047e37

Please sign in to comment.