@@ -2,18 +2,29 @@ import { expect } from '@playwright/test';
2
2
import type { Event } from '@sentry/types' ;
3
3
4
4
import { sentryTest } from '../../../utils/fixtures' ;
5
- import { getFirstSentryEnvelopeRequest } from '../../../utils/helpers' ;
5
+ import { envelopeRequestParser , getFirstSentryEnvelopeRequest , waitForErrorRequestOnUrl } from '../../../utils/helpers' ;
6
6
7
7
sentryTest (
8
8
'should add source context lines around stack frames from errors in Html inline JS' ,
9
- async ( { getLocalTestPath, page } ) => {
9
+ async ( { getLocalTestPath, page, browserName } ) => {
10
+ if ( browserName === 'webkit' ) {
11
+ // The error we're throwing in this test is thrown as "Script error." in Webkit.
12
+ // We filter "Script error." out by default in `InboundFilters`.
13
+ // I don't think there's much value to disable InboundFilters defaults for this test,
14
+ // given that most of our users won't do that either.
15
+ // Let's skip it instead for Webkit.
16
+ sentryTest . skip ( ) ;
17
+ }
18
+
10
19
const url = await getLocalTestPath ( { testDir : __dirname } ) ;
11
20
12
- const eventPromise = getFirstSentryEnvelopeRequest < Event > ( page , url ) ;
21
+ const eventReqPromise = waitForErrorRequestOnUrl ( page , url ) ;
13
22
14
23
const clickPromise = page . click ( '#inline-error-btn' ) ;
15
24
16
- const [ eventData ] = await Promise . all ( [ eventPromise , clickPromise ] ) ;
25
+ const [ req ] = await Promise . all ( [ eventReqPromise , clickPromise ] ) ;
26
+
27
+ const eventData = envelopeRequestParser ( req ) ;
17
28
18
29
expect ( eventData . exception ?. values ) . toHaveLength ( 1 ) ;
19
30
0 commit comments