@@ -20,7 +20,11 @@ test('Creates a navigation transaction for app router routes', async ({ page })
20
20
const randomRoute = String ( Math . random ( ) ) ;
21
21
22
22
const clientPageloadTransactionPromise = waitForTransaction ( 'nextjs-13-app-dir' , transactionEvent => {
23
- console . log ( 'transaction1' , JSON . stringify ( transactionEvent , null , 2 ) ) ;
23
+ console . log (
24
+ 'transaction1' ,
25
+ transactionEvent . transaction ,
26
+ JSON . stringify ( transactionEvent . contexts ?. trace , null , 2 ) ,
27
+ ) ;
24
28
return (
25
29
transactionEvent ?. transaction === `/server-component/parameter/${ randomRoute } ` &&
26
30
transactionEvent . contexts ?. trace ?. op === 'pageload'
@@ -32,15 +36,23 @@ test('Creates a navigation transaction for app router routes', async ({ page })
32
36
await page . getByText ( 'Page (/server-component/parameter/[parameter])' ) . isVisible ( ) ;
33
37
34
38
const clientNavigationTransactionPromise = waitForTransaction ( 'nextjs-13-app-dir' , transactionEvent => {
35
- console . log ( 'transaction2' , JSON . stringify ( transactionEvent , null , 2 ) ) ;
39
+ console . log (
40
+ 'transaction2' ,
41
+ transactionEvent . transaction ,
42
+ JSON . stringify ( transactionEvent . contexts ?. trace , null , 2 ) ,
43
+ ) ;
36
44
return (
37
45
transactionEvent ?. transaction === '/server-component/parameter/foo/bar/baz' &&
38
46
transactionEvent . contexts ?. trace ?. op === 'navigation'
39
47
) ;
40
48
} ) ;
41
49
42
50
const serverComponentTransactionPromise = waitForTransaction ( 'nextjs-13-app-dir' , async transactionEvent => {
43
- console . log ( 'transaction3' , JSON . stringify ( transactionEvent , null , 2 ) ) ;
51
+ console . log (
52
+ 'transaction3' ,
53
+ transactionEvent . transaction ,
54
+ JSON . stringify ( transactionEvent . contexts ?. trace , null , 2 ) ,
55
+ ) ;
44
56
return (
45
57
transactionEvent ?. transaction === 'Page Server Component (/server-component/parameter/[...parameters])' &&
46
58
( await clientNavigationTransactionPromise ) . contexts ?. trace ?. trace_id ===
0 commit comments