File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/async-spans Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 11import { expect } from '@playwright/test' ;
2+ import type { Event } from '@sentry/types' ;
23import { sentryTest } from '../../../../utils/fixtures' ;
4+ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers' ;
35
46type WindowWithSpan = Window & {
57 firstWaitingSpan : any ;
@@ -13,13 +15,8 @@ sentryTest(
1315 const url = await getLocalTestPath ( { testDir : __dirname } ) ;
1416 await page . goto ( url ) ;
1517
16- await page . waitForFunction (
17- ( ) =>
18- typeof window !== 'undefined' &&
19- ( window as unknown as WindowWithSpan ) . firstWaitingSpan &&
20- ( window as unknown as WindowWithSpan ) . secondWaitingSpan &&
21- ( window as unknown as WindowWithSpan ) . thirdWaitingSpan ,
22- ) ;
18+ const envelope = await getFirstSentryEnvelopeRequest < Event > ( page ) ;
19+ expect ( envelope ) . toBeDefined ( ) ;
2320
2421 const firstWaitingSpanValue = await page . evaluate (
2522 ( ) => ( window as unknown as WindowWithSpan ) . firstWaitingSpan . _name ,
You can’t perform that action at this time.
0 commit comments