chore(testServer): accept video parameter when running tests (#30832)

This commit is contained in:
Pavel Feldman 2024-05-15 12:45:57 -07:00 committed by GitHub
parent 5fa0583dcb
commit 8dec672121
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -94,6 +94,7 @@ export interface TestServerInterface {
timeout?: number,
reporters?: string[],
trace?: 'on' | 'off';
video?: 'on' | 'off';
projects?: string[];
reuseContext?: boolean;
connectWsEndpoint?: string;

View File

@ -308,7 +308,7 @@ class TestServerDispatcher implements TestServerInterface {
reporter: params.reporters ? params.reporters.map(r => [r]) : undefined,
use: {
trace: params.trace === 'on' ? { mode: 'on', sources: false, _live: true } : (params.trace === 'off' ? 'off' : undefined),
video: 'off',
video: params.video === 'on' ? 'on' : (params.video === 'off' ? 'off' : undefined),
headless: params.headed ? false : undefined,
_optionContextReuseMode: params.reuseContext ? 'when-possible' : undefined,
_optionConnectOptions: params.connectWsEndpoint ? { wsEndpoint: params.connectWsEndpoint } : undefined,