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 1
1
import { expect } from '@playwright/test' ;
2
+ import type { Event } from '@sentry/types' ;
2
3
import { sentryTest } from '../../../../utils/fixtures' ;
4
+ import { getFirstSentryEnvelopeRequest } from '../../../../utils/helpers' ;
3
5
4
6
type WindowWithSpan = Window & {
5
7
firstWaitingSpan : any ;
@@ -13,13 +15,8 @@ sentryTest(
13
15
const url = await getLocalTestPath ( { testDir : __dirname } ) ;
14
16
await page . goto ( url ) ;
15
17
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 ( ) ;
23
20
24
21
const firstWaitingSpanValue = await page . evaluate (
25
22
( ) => ( window as unknown as WindowWithSpan ) . firstWaitingSpan . _name ,
You can’t perform that action at this time.
0 commit comments