From 35379aba75fb592560f56eaca38f43e13336c611 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 11 Feb 2020 17:35:53 +0100 Subject: [PATCH] smoke - headless option is troublesome --- .vscode/settings.json | 2 ++ test/automation/src/application.ts | 3 +-- test/automation/src/code.ts | 4 +--- test/automation/src/playwrightDriver.ts | 5 ++--- test/smoke/src/main.ts | 4 +--- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index e0fd4e23428..d56f75c41d4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -22,6 +22,8 @@ "i18n/**": true, "extensions/**/out/**": true, "test/smoke/out/**": true, + "test/automation/out/**": true, + "test/integration/browser/out/**": true, "src/vs/base/test/node/uri.test.data.txt": true }, "lcov.path": [ diff --git a/test/automation/src/application.ts b/test/automation/src/application.ts index e95b5f561c2..20e5e0e79b3 100644 --- a/test/automation/src/application.ts +++ b/test/automation/src/application.ts @@ -126,8 +126,7 @@ export class Application { extraArgs, remote: this.options.remote, web: this.options.web, - browser: this.options.browser, - headless: this.options.headless + browser: this.options.browser }); this._workbench = new Workbench(this._code, this.userDataPath); diff --git a/test/automation/src/code.ts b/test/automation/src/code.ts index dfe20727b8d..3b5a667f81f 100644 --- a/test/automation/src/code.ts +++ b/test/automation/src/code.ts @@ -103,8 +103,6 @@ export interface SpawnOptions { web?: boolean; /** A specific browser to use (requires web: true) */ browser?: 'chromium' | 'webkit' | 'firefox'; - /** Run in headless mode (only applies when web is true) */ - headless?: boolean; } async function createDriverHandle(): Promise { @@ -127,7 +125,7 @@ export async function spawn(options: SpawnOptions): Promise { if (options.web) { await launch(options.userDataDir, options.workspacePath, options.codePath); - connectDriver = connectPlaywrightDriver.bind(connectPlaywrightDriver, !!options.headless, options.browser); + connectDriver = connectPlaywrightDriver.bind(connectPlaywrightDriver, options.browser); } else { const env = process.env; diff --git a/test/automation/src/playwrightDriver.ts b/test/automation/src/playwrightDriver.ts index 410acd256cd..c18e01808d3 100644 --- a/test/automation/src/playwrightDriver.ts +++ b/test/automation/src/playwrightDriver.ts @@ -137,12 +137,11 @@ function waitForEndpoint(): Promise { }); } -export function connect(headless: boolean, engine: 'chromium' | 'webkit' | 'firefox' = 'chromium'): Promise<{ client: IDisposable, driver: IDriver }> { +export function connect(engine: 'chromium' | 'webkit' | 'firefox' = 'chromium'): Promise<{ client: IDisposable, driver: IDriver }> { return new Promise(async (c) => { const browser = await playwright[engine].launch({ // Run in Edge dev on macOS - // executablePath: '/Applications/Microsoft\ Edge\ Dev.app/Contents/MacOS/Microsoft\ Edge\ Dev', - headless + // executablePath: '/Applications/Microsoft\ Edge\ Dev.app/Contents/MacOS/Microsoft\ Edge\ Dev' }); const page = (await browser.defaultContext().pages())[0]; await page.setViewport({ width, height }); diff --git a/test/smoke/src/main.ts b/test/smoke/src/main.ts index c08ddd99c88..8122d235289 100644 --- a/test/smoke/src/main.ts +++ b/test/smoke/src/main.ts @@ -58,7 +58,6 @@ const opts = minimist(args, { 'verbose', 'remote', 'web', - 'headless', 'ci' ], default: { @@ -246,8 +245,7 @@ function createOptions(): ApplicationOptions { screenshotsPath, remote: opts.remote, web: opts.web, - browser: opts.browser, - headless: opts.headless + browser: opts.browser }; }