1
1
import type { Route } from '@playwright/test' ;
2
2
import { expect } from '@playwright/test' ;
3
- import type { Event , Span , SpanContext , Transaction } from '@sentry/types' ;
3
+ import type { SerializedEvent , Span , SpanContext , Transaction } from '@sentry/types' ;
4
4
5
5
import { sentryTest } from '../../../../utils/fixtures' ;
6
6
import {
@@ -30,7 +30,7 @@ sentryTest('should capture interaction transaction. @firefox', async ({ browserN
30
30
const url = await getLocalTestPath ( { testDir : __dirname } ) ;
31
31
32
32
await page . goto ( url ) ;
33
- await getFirstSentryEnvelopeRequest < Event > ( page ) ;
33
+ await getFirstSentryEnvelopeRequest < SerializedEvent > ( page ) ;
34
34
35
35
await page . locator ( '[data-test-id=interaction-button]' ) . click ( ) ;
36
36
await page . locator ( '.clicked[data-test-id=interaction-button]' ) . isVisible ( ) ;
@@ -51,7 +51,7 @@ sentryTest('should capture interaction transaction. @firefox', async ({ browserN
51
51
expect ( interactionSpan . timestamp ) . toBeDefined ( ) ;
52
52
53
53
const interactionSpanDuration = ( interactionSpan . timestamp ! - interactionSpan . start_timestamp ) * 1000 ;
54
- expect ( interactionSpanDuration ) . toBeGreaterThan ( 70 ) ;
54
+ expect ( interactionSpanDuration ) . toBeGreaterThan ( 65 ) ;
55
55
expect ( interactionSpanDuration ) . toBeLessThan ( 200 ) ;
56
56
} ) ;
57
57
@@ -70,12 +70,12 @@ sentryTest(
70
70
71
71
const url = await getLocalTestPath ( { testDir : __dirname } ) ;
72
72
await page . goto ( url ) ;
73
- await getFirstSentryEnvelopeRequest < Event > ( page ) ;
73
+ await getFirstSentryEnvelopeRequest < SerializedEvent > ( page ) ;
74
74
75
75
for ( let i = 0 ; i < 4 ; i ++ ) {
76
76
await wait ( 100 ) ;
77
77
await page . locator ( '[data-test-id=interaction-button]' ) . click ( ) ;
78
- const envelope = await getMultipleSentryEnvelopeRequests < Event > ( page , 1 ) ;
78
+ const envelope = await getMultipleSentryEnvelopeRequests < SerializedEvent > ( page , 1 ) ;
79
79
expect ( envelope [ 0 ] . spans ) . toHaveLength ( 1 ) ;
80
80
}
81
81
} ,
@@ -97,11 +97,11 @@ sentryTest(
97
97
const url = await getLocalTestPath ( { testDir : __dirname } ) ;
98
98
99
99
await page . goto ( url ) ;
100
- await getFirstSentryEnvelopeRequest < Event > ( page ) ;
100
+ await getFirstSentryEnvelopeRequest < SerializedEvent > ( page ) ;
101
101
102
102
await page . locator ( '[data-test-id=annotated-button]' ) . click ( ) ;
103
103
104
- const envelopes = await getMultipleSentryEnvelopeRequests < TransactionJSON > ( page , 1 ) ;
104
+ const envelopes = await getMultipleSentryEnvelopeRequests < SerializedEvent > ( page , 1 ) ;
105
105
expect ( envelopes ) . toHaveLength ( 1 ) ;
106
106
const eventData = envelopes [ 0 ] ;
107
107
0 commit comments