mirror of
https://github.com/Microsoft/vscode
synced 2024-08-26 12:29:37 +00:00
smoke - headless option is troublesome
This commit is contained in:
parent
06b06ca10a
commit
35379aba75
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
|
@ -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": [
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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<string> {
|
||||
|
@ -127,7 +125,7 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
|||
|
||||
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;
|
||||
|
||||
|
|
|
@ -137,12 +137,11 @@ function waitForEndpoint(): Promise<string> {
|
|||
});
|
||||
}
|
||||
|
||||
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 });
|
||||
|
|
|
@ -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
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue