@@ -7,25 +7,27 @@ import {
7
7
waitForTransactionRequestOnUrl ,
8
8
} from '../../../utils/helpers' ;
9
9
10
- sentryTest ( 'does not send profile envelope when document-policy is not set' , async ( { page , getLocalTestUrl } ) => {
11
- if ( shouldSkipTracingTest ( ) ) {
12
- // Profiling only works when tracing is enabled
13
- sentryTest . skip ( ) ;
14
- }
15
-
16
- const url = await getLocalTestUrl ( { testDir : __dirname } ) ;
10
+ sentryTest (
11
+ 'does not send profile envelope when document-policy is not set' ,
12
+ async ( { page , getLocalTestUrl , browserName } ) => {
13
+ if ( shouldSkipTracingTest ( ) || browserName !== 'chromium' ) {
14
+ // Profiling only works when tracing is enabled
15
+ sentryTest . skip ( ) ;
16
+ }
17
17
18
- const req = await waitForTransactionRequestOnUrl ( page , url ) ;
19
- const transactionEvent = properEnvelopeRequestParser < Event > ( req , 0 ) ;
20
- const profileEvent = properEnvelopeRequestParser < Profile > ( req , 1 ) ;
18
+ const url = await getLocalTestUrl ( { testDir : __dirname } ) ;
21
19
22
- expect ( transactionEvent ) . toBeDefined ( ) ;
20
+ const req = await waitForTransactionRequestOnUrl ( page , url ) ;
21
+ const transactionEvent = properEnvelopeRequestParser < Event > ( req , 0 ) ;
22
+ const profileEvent = properEnvelopeRequestParser < Profile > ( req , 1 ) ;
23
23
24
- expect ( profileEvent ) . toBeUndefined ( ) ;
25
- } ) ;
24
+ expect ( transactionEvent ) . toBeDefined ( ) ;
25
+ expect ( profileEvent ) . toBeUndefined ( ) ;
26
+ } ,
27
+ ) ;
26
28
27
- sentryTest ( 'sends profile envelope in legacy mode' , async ( { page, getLocalTestUrl } ) => {
28
- if ( shouldSkipTracingTest ( ) ) {
29
+ sentryTest ( 'sends profile envelope in legacy mode' , async ( { page, getLocalTestUrl, browserName } ) => {
30
+ if ( shouldSkipTracingTest ( ) || browserName !== 'chromium' ) {
29
31
// Profiling only works when tracing is enabled
30
32
sentryTest . skip ( ) ;
31
33
}
0 commit comments