@@ -69,30 +69,30 @@ test.describe('distributed tracing', () => {
6969
7070 test ( 'capture a distributed trace from a client-side API request with parametrized routes' , async ( { page } ) => {
7171 const clientTxnEventPromise = waitForTransaction ( 'nuxt-4' , txnEvent => {
72- return txnEvent . transaction === '/test-param/fetch-api/:param ()' ;
72+ return txnEvent . transaction === '/test-param/user/:userId ()' ;
7373 } ) ;
7474 const ssrTxnEventPromise = waitForTransaction ( 'nuxt-4' , txnEvent => {
75- return txnEvent . transaction ?. includes ( 'GET /test-param/fetch-api ' ) ?? false ;
75+ return txnEvent . transaction ?. includes ( 'GET /test-param/user ' ) ?? false ;
7676 } ) ;
7777 const serverReqTxnEventPromise = waitForTransaction ( 'nuxt-4' , txnEvent => {
78- return txnEvent . transaction ?. includes ( 'GET /api/test-param /' ) ?? false ;
78+ return txnEvent . transaction ?. includes ( 'GET /api/user /' ) ?? false ;
7979 } ) ;
8080
8181 // Navigate to the page which will trigger an API call from the client-side
82- await page . goto ( `/test-param/fetch-api /${ PARAM } ` ) ;
82+ await page . goto ( `/test-param/user /${ PARAM } ` ) ;
8383
8484 const [ clientTxnEvent , ssrTxnEvent , serverReqTxnEvent ] = await Promise . all ( [
8585 clientTxnEventPromise ,
8686 ssrTxnEventPromise ,
8787 serverReqTxnEventPromise ,
8888 ] ) ;
8989
90- const httpClientSpan = clientTxnEvent ?. spans ?. find ( span => span . description === `GET /api/test-param /${ PARAM } ` ) ;
90+ const httpClientSpan = clientTxnEvent ?. spans ?. find ( span => span . description === `GET /api/user /${ PARAM } ` ) ;
9191
9292 expect ( clientTxnEvent ) . toEqual (
9393 expect . objectContaining ( {
9494 type : 'transaction' ,
95- transaction : '/test-param/fetch-api/:param ()' , // parametrized route
95+ transaction : '/test-param/user/:userId ()' , // parametrized route
9696 transaction_info : { source : 'route' } ,
9797 contexts : expect . objectContaining ( {
9898 trace : expect . objectContaining ( {
@@ -106,10 +106,10 @@ test.describe('distributed tracing', () => {
106106 expect ( httpClientSpan ) . toBeDefined ( ) ;
107107 expect ( httpClientSpan ) . toEqual (
108108 expect . objectContaining ( {
109- description : `GET /api/test-param /${ PARAM } ` , // fixme: parametrize
109+ description : `GET /api/user /${ PARAM } ` , // fixme: parametrize
110110 parent_span_id : clientTxnEvent . contexts ?. trace ?. span_id , // pageload span is parent
111111 data : expect . objectContaining ( {
112- url : `/api/test-param /${ PARAM } ` , // fixme: parametrize
112+ url : `/api/user /${ PARAM } ` ,
113113 type : 'fetch' ,
114114 'sentry.op' : 'http.client' ,
115115 'sentry.origin' : 'auto.http.browser' ,
@@ -121,7 +121,7 @@ test.describe('distributed tracing', () => {
121121 expect ( ssrTxnEvent ) . toEqual (
122122 expect . objectContaining ( {
123123 type : 'transaction' ,
124- transaction : `GET /test-param/fetch-api /${ PARAM } ` , // fixme: parametrize (nitro)
124+ transaction : `GET /test-param/user /${ PARAM } ` , // fixme: parametrize (nitro)
125125 transaction_info : { source : 'url' } ,
126126 contexts : expect . objectContaining ( {
127127 trace : expect . objectContaining ( {
@@ -135,7 +135,7 @@ test.describe('distributed tracing', () => {
135135 expect ( serverReqTxnEvent ) . toEqual (
136136 expect . objectContaining ( {
137137 type : 'transaction' ,
138- transaction : `GET /api/test-param /${ PARAM } ` ,
138+ transaction : `GET /api/user /${ PARAM } ` ,
139139 transaction_info : { source : 'url' } ,
140140 contexts : expect . objectContaining ( {
141141 trace : expect . objectContaining ( {
0 commit comments