@@ -2857,47 +2857,50 @@ describe('TraceTree', () => {
2857
2857
expect ( serverHandlerTransaction . parent ) . toBe ( pageloadTransaction ) ;
2858
2858
} ) ;
2859
2859
describe ( 'expanded' , ( ) => {
2860
- it ( 'server handler transaction becomes a child of browser request span if present' , async ( ) => {
2861
- const tree : TraceTree = TraceTree . FromTrace (
2862
- makeTrace ( {
2863
- transactions : [
2864
- makeTransaction ( {
2865
- transaction : 'SSR' ,
2866
- event_id : 'ssr' ,
2867
- project_slug : 'js' ,
2868
- [ 'transaction.op' ] : 'http.server' ,
2869
- children : [
2870
- makeTransaction ( {
2871
- transaction : 'pageload' ,
2872
- [ 'transaction.op' ] : 'pageload' ,
2873
- } ) ,
2874
- ] ,
2875
- } ) ,
2876
- ] ,
2877
- } ) ,
2878
- null ,
2879
- null
2880
- ) ;
2860
+ it . each ( [ [ 'browser' ] , [ 'browser.request' ] ] ) (
2861
+ 'server handler transaction becomes a child of %s span if present' ,
2862
+ async span_op => {
2863
+ const tree : TraceTree = TraceTree . FromTrace (
2864
+ makeTrace ( {
2865
+ transactions : [
2866
+ makeTransaction ( {
2867
+ transaction : 'SSR' ,
2868
+ event_id : 'ssr' ,
2869
+ project_slug : 'js' ,
2870
+ [ 'transaction.op' ] : 'http.server' ,
2871
+ children : [
2872
+ makeTransaction ( {
2873
+ transaction : 'pageload' ,
2874
+ [ 'transaction.op' ] : 'pageload' ,
2875
+ } ) ,
2876
+ ] ,
2877
+ } ) ,
2878
+ ] ,
2879
+ } ) ,
2880
+ null ,
2881
+ null
2882
+ ) ;
2881
2883
2882
- MockApiClient . addMockResponse ( {
2883
- url : '/organizations/org-slug/events/js:ssr/?averageColumn=span.self_time&averageColumn=span.duration' ,
2884
- method : 'GET' ,
2885
- body : makeEvent ( { } , [ makeSpan ( { description : 'request' , op : 'browser' } ) ] ) ,
2886
- } ) ;
2884
+ MockApiClient . addMockResponse ( {
2885
+ url : '/organizations/org-slug/events/js:ssr/?averageColumn=span.self_time&averageColumn=span.duration' ,
2886
+ method : 'GET' ,
2887
+ body : makeEvent ( { } , [ makeSpan ( { description : 'request' , op : span_op } ) ] ) ,
2888
+ } ) ;
2887
2889
2888
- tree . zoomIn ( tree . list [ 1 ] , true , {
2889
- api : new MockApiClient ( ) ,
2890
- organization : OrganizationFixture ( ) ,
2891
- } ) ;
2890
+ tree . zoomIn ( tree . list [ 1 ] , true , {
2891
+ api : new MockApiClient ( ) ,
2892
+ organization : OrganizationFixture ( ) ,
2893
+ } ) ;
2892
2894
2893
- await waitFor ( ( ) => tree . list . length === 4 ) ;
2894
- const browserRequestSpan = tree . list [ 1 ] . children [ 0 ] ;
2895
- const ssrTransaction = browserRequestSpan . children [ 0 ] ;
2895
+ await waitFor ( ( ) => tree . list . length === 4 ) ;
2896
+ const browserRequestSpan = tree . list [ 1 ] . children [ 0 ] ;
2897
+ const ssrTransaction = browserRequestSpan . children [ 0 ] ;
2896
2898
2897
- assertSpanNode ( browserRequestSpan ) ;
2898
- assertTransactionNode ( ssrTransaction ) ;
2899
- expect ( ssrTransaction . value . transaction ) . toBe ( 'SSR' ) ;
2900
- } ) ;
2899
+ assertSpanNode ( browserRequestSpan ) ;
2900
+ assertTransactionNode ( ssrTransaction ) ;
2901
+ expect ( ssrTransaction . value . transaction ) . toBe ( 'SSR' ) ;
2902
+ }
2903
+ ) ;
2901
2904
it ( 'server handler transaction becomes a direct child if there is no matching browser request span' , async ( ) => {
2902
2905
const tree : TraceTree = TraceTree . FromTrace (
2903
2906
makeTrace ( {
0 commit comments