File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
dev-packages/browser-integration-tests/suites/tracing/browserTracingIntegration/pageloadWithChildSpanTimeout Expand file tree Collapse file tree 1 file changed +9
-5
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' ;
3
2
4
3
import { sentryTest } from '../../../../utils/fixtures' ;
5
- import { getFirstSentryEnvelopeRequest , shouldSkipTracingTest } from '../../../../utils/helpers' ;
4
+ import {
5
+ envelopeRequestParser ,
6
+ shouldSkipTracingTest ,
7
+ waitForTransactionRequestOnUrl ,
8
+ } from '../../../../utils/helpers' ;
6
9
7
10
// This tests asserts that the pageload span will finish itself after the child span timeout if it
8
11
// has a child span without adding any additional ones or finishing any of them finishing. All of the child spans that
9
12
// are still running should have the status "cancelled".
10
- sentryTest ( 'should send a pageload span terminated via child span timeout' , async ( { getLocalTestPath , page } ) => {
13
+ sentryTest ( 'should send a pageload span terminated via child span timeout' , async ( { getLocalTestUrl , page } ) => {
11
14
if ( shouldSkipTracingTest ( ) ) {
12
15
sentryTest . skip ( ) ;
13
16
}
14
17
15
- const url = await getLocalTestPath ( { testDir : __dirname } ) ;
18
+ const url = await getLocalTestUrl ( { testDir : __dirname } ) ;
19
+ const req = await waitForTransactionRequestOnUrl ( page , url ) ;
16
20
17
- const eventData = await getFirstSentryEnvelopeRequest < Event > ( page , url ) ;
21
+ const eventData = envelopeRequestParser ( req ) ;
18
22
19
23
expect ( eventData . contexts ?. trace ?. op ) . toBe ( 'pageload' ) ;
20
24
expect ( eventData . spans ?. length ) . toBeGreaterThanOrEqual ( 1 ) ;
You can’t perform that action at this time.
0 commit comments