Skip to content

Commit 431b019

Browse files
committed
fix(test): Fix flaky browser integration tests.
1 parent 84baeb1 commit 431b019

File tree

4 files changed

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

4 files changed

+7
-6
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);

dev-packages/browser-integration-tests/suites/stacktraces/protocol_fn_identifiers/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { sentryTest } from '../../../utils/fixtures';
55
import { getFirstSentryEnvelopeRequest } from '../../../utils/helpers';
66

77
sentryTest(
8-
'should parse function identifiers that are protocol names correctly @firefox',
8+
'should parse function identifiers that are protocol names correctly',
99
async ({ getLocalTestPath, page, runInChromium, runInFirefox, runInWebkit }) => {
1010
const url = await getLocalTestPath({ testDir: __dirname });
1111

0 commit comments

Comments
 (0)