From daff1a9025d90bbfab2fc085caa825939f5608bd Mon Sep 17 00:00:00 2001 From: Pavel Feldman Date: Wed, 9 Oct 2024 17:46:54 -0700 Subject: [PATCH] cherry-pick(#33030): fix(ui): bring back the headed param --- packages/playwright/src/runner/testServer.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/playwright/src/runner/testServer.ts b/packages/playwright/src/runner/testServer.ts index 50a8de366e928..ff37da717c1fe 100644 --- a/packages/playwright/src/runner/testServer.ts +++ b/packages/playwright/src/runner/testServer.ts @@ -302,10 +302,11 @@ export class TestServerDispatcher implements TestServerInterface { preserveOutputDir: true, reporter: params.reporters ? params.reporters.map(r => [r]) : undefined, use: { - ...(this._configCLIOverrides.use || {}), - trace: params.trace === 'on' ? { mode: 'on', sources: false, _live: true } : (params.trace === 'off' ? 'off' : undefined), - video: params.video === 'on' ? 'on' : (params.video === 'off' ? 'off' : undefined), - headless: params.headed ? false : undefined, + ...this._configCLIOverrides.use, + ...(params.trace === 'on' ? { trace: { mode: 'on', sources: false, _live: true } } : {}), + ...(params.trace === 'off' ? { trace: 'off' } : {}), + ...(params.video === 'on' || params.video === 'off' ? { video: params.video } : {}), + ...(params.headed !== undefined ? { headless: !params.headed } : {}), _optionContextReuseMode: params.reuseContext ? 'when-possible' : undefined, _optionConnectOptions: params.connectWsEndpoint ? { wsEndpoint: params.connectWsEndpoint } : undefined, },