@@ -31,7 +31,7 @@ type BaseWorkerFixtures = {
3131} ;
3232
3333export type TraceViewerFixtures = {
34- showTraceViewer : ( trace : string | undefined , options ?: { host ?: string , port ?: number , stdin ?: boolean } ) => Promise < TraceViewerPage > ;
34+ showTraceViewer : ( trace : string | undefined , options ?: { host ?: string , port ?: number , stdin ?: boolean , cwd ?: string } ) => Promise < TraceViewerPage > ;
3535 runAndTrace : ( body : ( ) => Promise < void > , optsOverrides ?: Parameters < BrowserContext [ 'tracing' ] [ 'start' ] > [ 0 ] ) => Promise < TraceViewerPage > ;
3636} ;
3737
@@ -153,7 +153,7 @@ export const traceViewerFixtures: Fixtures<TraceViewerFixtures, {}, BaseTestFixt
153153 showTraceViewer : async ( { playwright, childProcess, browserName } , use , testInfo ) => {
154154 const browsers : Browser [ ] = [ ] ;
155155 const tracings : any [ ] = [ ] ;
156- await use ( async ( trace : string | undefined , { host, port, stdin } = { } ) => {
156+ await use ( async ( trace : string | undefined , { host, port, stdin, cwd } = { } ) => {
157157 const command = [
158158 'node' ,
159159 path . join ( __dirname , '../../packages/playwright-core/cli.js' ) ,
@@ -166,7 +166,7 @@ export const traceViewerFixtures: Fixtures<TraceViewerFixtures, {}, BaseTestFixt
166166 command . push ( '--stdin' ) ;
167167 if ( trace )
168168 command . push ( trace ) ;
169- const cp = childProcess ( { command } ) ;
169+ const cp = childProcess ( { command, cwd } ) ;
170170 await cp . waitForOutput ( 'Listening on' ) ;
171171 const browser = await playwright . chromium . launch ( {
172172 ...( browserName === 'chromium' ? { } : { channel : 'chromium' } ) ,
0 commit comments