Skip to content

Commit 4ee335e

Browse files
committed
test(browser): Unflake some more tests
1 parent c0005cd commit 4ee335e

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

  • dev-packages/browser-integration-tests/suites
    • profiling/traceLifecycleMode_overlapping-spans
    • public-api/startSpan/error-sync
    • tracing/browserTracingIntegration/error

dev-packages/browser-integration-tests/suites/profiling/traceLifecycleMode_overlapping-spans/test.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,15 @@ sentryTest(
3939
}
4040

4141
const url = await getLocalTestUrl({ testDir: __dirname, responseHeaders: { 'Document-Policy': 'js-profiling' } });
42-
await page.goto(url);
4342

44-
const profileChunkEnvelopePromise = getMultipleSentryEnvelopeRequests<ProfileChunkEnvelope>(
43+
const profileChunkEnvelopes = await getMultipleSentryEnvelopeRequests<ProfileChunkEnvelope>(
4544
page,
4645
1,
47-
{ envelopeType: 'profile_chunk' },
46+
{ url, envelopeType: 'profile_chunk', timeout: 5000 },
4847
properFullEnvelopeRequestParser,
4948
);
5049

51-
const profileChunkEnvelopeItem = (await profileChunkEnvelopePromise)[0][1][0];
50+
const profileChunkEnvelopeItem = profileChunkEnvelopes[0][1][0];
5251
const envelopeItemHeader = profileChunkEnvelopeItem[0];
5352
const envelopeItemPayload = profileChunkEnvelopeItem[1];
5453

dev-packages/browser-integration-tests/suites/public-api/startSpan/error-sync/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ sentryTest(
2121

2222
const url = await getLocalTestUrl({ testDir: __dirname });
2323

24-
await page.goto(url);
25-
2624
const errorEventsPromise = getMultipleSentryEnvelopeRequests<Event>(page, 2);
2725

26+
await page.goto(url);
27+
2828
await runScriptInSandbox(page, {
2929
content: `
3030
function run() {

dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/error/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ sentryTest(
2121

2222
const url = await getLocalTestUrl({ testDir: __dirname });
2323

24-
await page.goto(url);
25-
2624
const errorEventsPromise = getMultipleSentryEnvelopeRequests<Event>(page, 2);
2725

26+
await page.goto(url);
27+
2828
await runScriptInSandbox(page, {
2929
content: `
3030
throw new Error('Error during pageload');

0 commit comments

Comments
 (0)