Get rid of dependency on playwright-mcp (#292432)

This commit is contained in:
Tyler James Leonhardt
2026-02-02 23:16:17 -08:00
committed by GitHub
parent 2c2c45a9b5
commit c8d90ab45f
10 changed files with 82 additions and 654 deletions

View File

@@ -3,13 +3,12 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as playwright from 'playwright';
import { getDevElectronPath, Quality, ConsoleLogger, FileLogger, Logger, MultiLogger, getBuildElectronPath, getBuildVersion, measureAndLog, Application } from '../../automation';
import * as path from 'path';
import * as fs from 'fs';
import * as os from 'os';
import * as vscodetest from '@vscode/test-electron';
import { createApp, retry } from './utils';
import { createApp, retry, parseVersion } from './utils';
import { opts } from './options';
const rootPath = path.join(__dirname, '..', '..', '..');
@@ -61,11 +60,6 @@ function fail(errorMessage): void {
let quality: Quality;
let version: string | undefined;
function parseVersion(version: string): { major: number; minor: number; patch: number } {
const [, major, minor, patch] = /^(\d+)\.(\d+)\.(\d+)/.exec(version)!;
return { major: parseInt(major), minor: parseInt(minor), patch: parseInt(patch) };
}
function parseQuality(): Quality {
if (process.env.VSCODE_DEV === '1') {
return Quality.Dev;
@@ -245,10 +239,6 @@ export async function getApplication({ recordVideo, workspacePath }: { recordVid
await setup();
const application = createApp({
// Pass the alpha version of Playwright down... This is a hack since Playwright MCP
// doesn't play nice with Playwright Test: https://github.com/microsoft/playwright-mcp/issues/917
// eslint-disable-next-line local/code-no-any-casts
playwright: playwright as any,
quality,
version: parseVersion(version ?? '0.0.0'),
codePath: opts.build,