From bdda90925403dbdb99c10f0a225a15a498c4c70c Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Mon, 28 Oct 2024 14:21:47 +0100 Subject: [PATCH] test: Fix flaky loader test --- .../loader-suites/loader/onLoad/sentryOnLoadError/test.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadError/test.ts b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadError/test.ts index ab2616ef382d..fbd79711d8fa 100644 --- a/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadError/test.ts +++ b/dev-packages/browser-integration-tests/loader-suites/loader/onLoad/sentryOnLoadError/test.ts @@ -8,6 +8,14 @@ sentryTest( async ({ getLocalTestUrl, page }) => { const errors: string[] = []; + await page.route('https://dsn.ingest.sentry.io/**/*', route => { + return route.fulfill({ + status: 200, + contentType: 'application/json', + body: JSON.stringify({ id: 'test-id' }), + }); + }); + page.on('console', msg => { if (msg.type() === 'error') { errors.push(msg.text());