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 2c3a27f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,17 @@ sentryTest(
sentryTest.skip();
}

page.route('**', route => route.continue());
await page.route('**/path/to/image.png', (route: Route) =>
route.fulfill({ path: `${__dirname}/assets/sentry-logo-600x179.png` }),
);

const url = await getLocalTestPath({ testDir: __dirname });

const [eventData] = await Promise.all([
getFirstSentryEnvelopeRequest<Event>(page),
page.goto(url),
page.click('button'),
page.locator('button').click(),
]);

expect(eventData.measurements).toBeDefined();
Expand Down

0 comments on commit 2c3a27f

Please sign in to comment.