From 8dec672121bb12dbc8371995c1cdba3ca0565ffb Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Wed, 15 May 2024 12:45:57 -0700 Subject: [PATCH] chore(testServer): accept video parameter when running tests (#30832) --- packages/playwright/src/isomorphic/testServerInterface.ts | 1 + packages/playwright/src/runner/testServer.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/playwright/src/isomorphic/testServerInterface.ts b/packages/playwright/src/isomorphic/testServerInterface.ts index 56cac53f5bd47..4abf3f02fec49 100644 --- a/packages/playwright/src/isomorphic/testServerInterface.ts +++ b/packages/playwright/src/isomorphic/testServerInterface.ts @@ -94,6 +94,7 @@ export interface TestServerInterface { timeout?: number, reporters?: string[], trace?: 'on' | 'off'; + video?: 'on' | 'off'; projects?: string[]; reuseContext?: boolean; connectWsEndpoint?: string; diff --git a/packages/playwright/src/runner/testServer.ts b/packages/playwright/src/runner/testServer.ts index e7670c3548abc..706e296da4c38 100644 --- a/packages/playwright/src/runner/testServer.ts +++ b/packages/playwright/src/runner/testServer.ts @@ -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,