Skip to content

Commit ba85ddb

Browse files
committed
fix(test): Fix flaky browser integration tests.
1 parent 2227b27 commit ba85ddb

File tree

3 files changed

+6
-5
lines changed
  • dev-packages/browser-integration-tests/suites

3 files changed

+6
-5
lines changed

dev-packages/browser-integration-tests/suites/integrations/Breadcrumbs/dom/click/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ sentryTest(
7676

7777
const promise = getFirstSentryEnvelopeRequest<Event>(page);
7878

79-
await page.goto(url);
80-
await page.locator('#annotated-button').click();
79+
await Promise.all([page.goto(url), page.locator('#annotated-button').click()]);
80+
8181
await page.evaluate('Sentry.captureException("test exception")');
8282

8383
const eventData = await promise;

dev-packages/browser-integration-tests/suites/public-api/startSpan/basic/subject.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ async function run() {
66
});
77
}
88

9-
run();
9+
(async () => {
10+
await run();
11+
})();

dev-packages/browser-integration-tests/suites/replay/errorResponse/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@ sentryTest('should stop recording after receiving an error response', async ({ g
2323
});
2424

2525
const url = await getLocalTestPath({ testDir: __dirname });
26-
await page.goto(url);
26+
await Promise.all([page.goto(url), waitForReplayRequest(page)]);
2727

28-
await waitForReplayRequest(page);
2928
await page.locator('button').click();
3029

3130
expect(called).toBe(1);

0 commit comments

Comments
 (0)