mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: remove unused PW_TEST_OUT_OF_PROCESS_DRIVER (#19434)
This commit is contained in:
parent
b97900b925
commit
ab9602bebf
@ -18,7 +18,6 @@ import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import type { APIRequestContext, BrowserContext, BrowserContextOptions, LaunchOptions, Page, Tracing, Video } from 'playwright-core';
|
||||
import * as playwrightLibrary from 'playwright-core';
|
||||
import * as outOfProcess from 'playwright-core/lib/outofprocess';
|
||||
import { createGuid, debugMode } from 'playwright-core/lib/utils';
|
||||
import { removeFolders } from 'playwright-core/lib/utils/fileUtils';
|
||||
import type { Fixtures, PlaywrightTestArgs, PlaywrightTestOptions, PlaywrightWorkerArgs, PlaywrightWorkerOptions, TestInfo, TestType, TraceMode, VideoMode } from '../types/test';
|
||||
@ -58,18 +57,8 @@ type WorkerFixtures = PlaywrightWorkerArgs & PlaywrightWorkerOptions & {
|
||||
const playwrightFixtures: Fixtures<TestFixtures, WorkerFixtures> = ({
|
||||
defaultBrowserType: ['chromium', { scope: 'worker', option: true }],
|
||||
browserName: [({ defaultBrowserType }, use) => use(defaultBrowserType), { scope: 'worker', option: true }],
|
||||
playwright: [async ({ }, use) => {
|
||||
if (process.env.PW_OUT_OF_PROCESS_DRIVER) {
|
||||
const impl = await outOfProcess.start({
|
||||
NODE_OPTIONS: undefined // Hide driver process while debugging.
|
||||
});
|
||||
const pw = impl.playwright as any;
|
||||
pw._setSelectors(playwrightLibrary.selectors);
|
||||
await use(pw);
|
||||
await impl.stop();
|
||||
} else {
|
||||
await use(require('playwright-core'));
|
||||
}
|
||||
playwright: [async ({}, use) => {
|
||||
await use(require('playwright-core'));
|
||||
}, { scope: 'worker' }],
|
||||
headless: [({ launchOptions }, use) => use(launchOptions.headless ?? true), { scope: 'worker', option: true }],
|
||||
channel: [({ launchOptions }, use) => use(launchOptions.channel), { scope: 'worker', option: true }],
|
||||
|
||||
@ -35,9 +35,7 @@ const getExecutablePath = (browserName: BrowserName) => {
|
||||
};
|
||||
|
||||
let mode: TestModeName = 'default';
|
||||
if (process.env.PW_OUT_OF_PROCESS_DRIVER)
|
||||
mode = 'driver';
|
||||
else if (process.env.PLAYWRIGHT_DOCKER)
|
||||
if (process.env.PLAYWRIGHT_DOCKER)
|
||||
mode = 'docker';
|
||||
else
|
||||
mode = (process.env.PWTEST_MODE ?? 'default') as ('default' | 'driver' | 'service' | 'service2');
|
||||
|
||||
@ -211,7 +211,6 @@ async function runPlaywrightCommand(childProcess: CommonFixtures['childProcess']
|
||||
PW_TEST_REPORTER_WS_ENDPOINT: undefined,
|
||||
PW_TEST_SOURCE_TRANSFORM: undefined,
|
||||
PW_TEST_SOURCE_TRANSFORM_SCOPE: undefined,
|
||||
PW_OUT_OF_PROCESS_DRIVER: undefined,
|
||||
NODE_OPTIONS: undefined,
|
||||
...env,
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user