chore: pass outputDir to uimode (#30941)
Fixes https://github.com/microsoft/playwright/issues/30886
This commit is contained in:
parent
148d759a4c
commit
7b27fc3916
|
|
@ -46,6 +46,7 @@ export type TraceViewerRedirectOptions = {
|
|||
reporter?: string[];
|
||||
webApp?: string;
|
||||
isServer?: boolean;
|
||||
outputDir?: string;
|
||||
};
|
||||
|
||||
export type TraceViewerAppOptions = {
|
||||
|
|
@ -129,6 +130,8 @@ export async function installRootRedirect(server: HttpServer, traceUrls: string[
|
|||
params.append('timeout', String(options.timeout));
|
||||
if (options.headed)
|
||||
params.append('headed', '');
|
||||
if (options.outputDir)
|
||||
params.append('outputDir', options.outputDir);
|
||||
for (const reporter of options.reporter || [])
|
||||
params.append('reporter', reporter);
|
||||
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ export interface TestServerInterface {
|
|||
headed?: boolean;
|
||||
workers?: number | string;
|
||||
timeout?: number,
|
||||
outputDir?: string;
|
||||
reporters?: string[],
|
||||
trace?: 'on' | 'off';
|
||||
video?: 'on' | 'off';
|
||||
|
|
|
|||
|
|
@ -170,6 +170,7 @@ async function runTests(args: string[], opts: { [key: string]: any }) {
|
|||
reporter: Array.isArray(opts.reporter) ? opts.reporter : opts.reporter ? [opts.reporter] : undefined,
|
||||
workers: cliOverrides.workers,
|
||||
timeout: cliOverrides.timeout,
|
||||
outputDir: cliOverrides.outputDir,
|
||||
});
|
||||
await stopProfiling('runner');
|
||||
if (status === 'restarted')
|
||||
|
|
|
|||
|
|
@ -313,6 +313,7 @@ class TestServerDispatcher implements TestServerInterface {
|
|||
_optionContextReuseMode: params.reuseContext ? 'when-possible' : undefined,
|
||||
_optionConnectOptions: params.connectWsEndpoint ? { wsEndpoint: params.connectWsEndpoint } : undefined,
|
||||
},
|
||||
outputDir: params.outputDir,
|
||||
workers: params.workers,
|
||||
};
|
||||
if (params.trace === 'on')
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ const queryParams = {
|
|||
workers: searchParams.get('workers') || undefined,
|
||||
timeout: searchParams.has('timeout') ? +searchParams.get('timeout')! : undefined,
|
||||
headed: searchParams.has('headed'),
|
||||
outputDir: searchParams.get('outputDir') || undefined,
|
||||
reporters: searchParams.has('reporter') ? searchParams.getAll('reporter') : undefined,
|
||||
};
|
||||
|
||||
|
|
@ -283,6 +284,7 @@ export const UIModeView: React.FC<{}> = ({
|
|||
workers: queryParams.workers,
|
||||
timeout: queryParams.timeout,
|
||||
headed: queryParams.headed,
|
||||
outputDir: queryParams.outputDir,
|
||||
reporters: queryParams.reporters,
|
||||
trace: 'on',
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue