Skip to content

Commit

Permalink
cherry-pick(#30832): chore(testServer): accept video parameter when r…
Browse files Browse the repository at this point in the history
…unning tests
  • Loading branch information
pavelfeldman committed May 15, 2024
1 parent 5d26230 commit 32bde52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/playwright/src/isomorphic/testServerInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export interface TestServerInterface {
timeout?: number,
reporters?: string[],
trace?: 'on' | 'off';
video?: 'on' | 'off';
projects?: string[];
reuseContext?: boolean;
connectWsEndpoint?: string;
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright/src/runner/testServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 32bde52

Please sign in to comment.