File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
packages/integration-tests/suites/tracing/metrics/web-vitals-ttfb Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ <html >
3
+ <head >
4
+ <meta charset =" utf-8" />
5
+ <title ></title >
6
+ <script src =" {{ htmlWebpackPlugin.options.initialization }} " ></script >
7
+ </head >
8
+ <body >
9
+ <div >Rendered</div >
10
+ </body >
11
+ </html >
Original file line number Diff line number Diff line change
1
+ import { expect } from '@playwright/test' ;
2
+
3
+ import { sentryTest } from '../../../../utils/fixtures' ;
4
+ import { getSentryTransactionRequest } from '../../../../utils/helpers' ;
5
+
6
+ sentryTest ( 'should capture TTFB vital.' , async ( { getLocalTestPath, page } ) => {
7
+ const url = await getLocalTestPath ( { testDir : __dirname } ) ;
8
+ const eventData = await getSentryTransactionRequest ( page , url ) ;
9
+
10
+ expect ( eventData . measurements ) . toBeDefined ( ) ;
11
+ expect ( eventData . measurements ?. ttfb ?. value ) . toBeDefined ( ) ;
12
+ expect ( eventData . measurements ?. [ 'ttfb.requestTime' ] ?. value ) . toBeDefined ( ) ;
13
+ } ) ;
You can’t perform that action at this time.
0 commit comments