1
1
import { expect } from '@playwright/test' ;
2
- import type { Event } from '@sentry/types' ;
2
+ import type { SerializedEvent } from '@sentry/types' ;
3
3
4
4
import { sentryTest } from '../../../../utils/fixtures' ;
5
5
import { getFirstSentryEnvelopeRequest , shouldSkipTracingTest } from '../../../../utils/helpers' ;
@@ -10,7 +10,7 @@ sentryTest('should send a transaction in an envelope', async ({ getLocalTestPath
10
10
}
11
11
12
12
const url = await getLocalTestPath ( { testDir : __dirname } ) ;
13
- const transaction = await getFirstSentryEnvelopeRequest < Event > ( page , url ) ;
13
+ const transaction = await getFirstSentryEnvelopeRequest < SerializedEvent > ( page , url ) ;
14
14
15
15
expect ( transaction . transaction ) . toBe ( 'parent_span' ) ;
16
16
expect ( transaction . spans ) . toBeDefined ( ) ;
@@ -22,14 +22,15 @@ sentryTest('should report finished spans as children of the root transaction', a
22
22
}
23
23
24
24
const url = await getLocalTestPath ( { testDir : __dirname } ) ;
25
- const transaction = await getFirstSentryEnvelopeRequest < Event > ( page , url ) ;
25
+ const transaction = await getFirstSentryEnvelopeRequest < SerializedEvent > ( page , url ) ;
26
26
27
- const rootSpanId = transaction ?. contexts ?. trace ?. spanId ;
27
+ const rootSpanId = transaction ?. contexts ?. trace ?. span_id ;
28
28
29
29
expect ( transaction . spans ) . toHaveLength ( 1 ) ;
30
30
31
31
const span_1 = transaction . spans ?. [ 0 ] ;
32
- // eslint-disable-next-line deprecation/deprecation
33
32
expect ( span_1 ?. description ) . toBe ( 'child_span' ) ;
34
- expect ( span_1 ?. parentSpanId ) . toEqual ( rootSpanId ) ;
33
+ expect ( span_1 ?. parent_span_id ) . toEqual ( rootSpanId ) ;
34
+ expect ( span_1 ?. origin ) . toEqual ( 'manual' ) ;
35
+ expect ( span_1 ?. data ?. [ 'sentry.origin' ] ) . toEqual ( 'manual' ) ;
35
36
} ) ;
0 commit comments