mirror of
https://github.com/microsoft/playwright.git
synced 2024-09-11 20:37:54 +03:00
parent
bc27ca225e
commit
48db1b1663
@ -47,6 +47,7 @@ export type TraceViewerRedirectOptions = {
|
||||
webApp?: string;
|
||||
isServer?: boolean;
|
||||
outputDir?: string;
|
||||
updateSnapshots?: 'all' | 'none' | 'missing';
|
||||
};
|
||||
|
||||
export type TraceViewerAppOptions = {
|
||||
@ -132,6 +133,8 @@ export async function installRootRedirect(server: HttpServer, traceUrls: string[
|
||||
params.append('headed', '');
|
||||
if (options.outputDir)
|
||||
params.append('outputDir', options.outputDir);
|
||||
if (options.updateSnapshots)
|
||||
params.append('updateSnapshots', options.updateSnapshots);
|
||||
for (const reporter of options.reporter || [])
|
||||
params.append('reporter', reporter);
|
||||
|
||||
|
@ -93,6 +93,7 @@ export interface TestServerInterface {
|
||||
workers?: number | string;
|
||||
timeout?: number,
|
||||
outputDir?: string;
|
||||
updateSnapshots?: 'all' | 'none' | 'missing';
|
||||
reporters?: string[],
|
||||
trace?: 'on' | 'off';
|
||||
video?: 'on' | 'off';
|
||||
|
@ -171,6 +171,7 @@ async function runTests(args: string[], opts: { [key: string]: any }) {
|
||||
workers: cliOverrides.workers,
|
||||
timeout: cliOverrides.timeout,
|
||||
outputDir: cliOverrides.outputDir,
|
||||
updateSnapshots: cliOverrides.updateSnapshots,
|
||||
});
|
||||
await stopProfiling('runner');
|
||||
if (status === 'restarted')
|
||||
|
@ -314,6 +314,7 @@ class TestServerDispatcher implements TestServerInterface {
|
||||
_optionConnectOptions: params.connectWsEndpoint ? { wsEndpoint: params.connectWsEndpoint } : undefined,
|
||||
},
|
||||
outputDir: params.outputDir,
|
||||
updateSnapshots: params.updateSnapshots,
|
||||
workers: params.workers,
|
||||
};
|
||||
if (params.trace === 'on')
|
||||
|
@ -61,8 +61,11 @@ const queryParams = {
|
||||
timeout: searchParams.has('timeout') ? +searchParams.get('timeout')! : undefined,
|
||||
headed: searchParams.has('headed'),
|
||||
outputDir: searchParams.get('outputDir') || undefined,
|
||||
updateSnapshots: (searchParams.get('updateSnapshots') as 'all' | 'none' | 'missing' | undefined) || undefined,
|
||||
reporters: searchParams.has('reporter') ? searchParams.getAll('reporter') : undefined,
|
||||
};
|
||||
if (queryParams.updateSnapshots && !['all', 'none', 'missing'].includes(queryParams.updateSnapshots))
|
||||
queryParams.updateSnapshots = undefined;
|
||||
|
||||
const isMac = navigator.platform === 'MacIntel';
|
||||
|
||||
@ -285,6 +288,7 @@ export const UIModeView: React.FC<{}> = ({
|
||||
timeout: queryParams.timeout,
|
||||
headed: queryParams.headed,
|
||||
outputDir: queryParams.outputDir,
|
||||
updateSnapshots: queryParams.updateSnapshots,
|
||||
reporters: queryParams.reporters,
|
||||
trace: 'on',
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user