Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: hide watch mode, it is not ready (#20905)
Pavel Feldman7f0763d789e6
diff --git a/packages/playwright-test/src/cli.ts b/packages/playwright-test/src/cli.tsindex ad1471e5fc..36233c0476 100644--- a/packages/playwright-test/src/cli.ts+++ b/packages/playwright-test/src/cli.ts@@ -60,7 +60,6 @@ function addTestCommand(program: Command) {command.option('--project <project-name...>', `Only run tests from the specified list of projects (default: run all projects)`);command.option('--timeout <timeout>', `Specify test timeout threshold in milliseconds, zero for unlimited (default: ${defaultTimeout})`);command.option('--trace <mode>', `Force tracing mode, can be ${kTraceModes.map(mode => `"${mode}"`).join(', ')}`);- command.option('--watch', `Run watch mode`);command.option('-u, --update-snapshots', `Update snapshots with actual results (default: only create missing snapshots)`);command.option('-x', `Stop after the first failure`);command.action(async (args, opts) => {@@ -167,7 +166,7 @@ async function runTests(args: string[], opts: { [key: string]: any }) {config._internal.passWithNoTests = !!opts.passWithNoTests;const runner = new Runner(config);- const status = opts.watch ? await runner.watchAllTests() : await runner.runAllTests();+ const status = process.env.PWTEST_WATCH ? await runner.watchAllTests() : await runner.runAllTests();await stopProfiling(undefined);if (status === 'interrupted')process.exit(130);diff --git a/tests/playwright-test/playwright-test-fixtures.ts b/tests/playwright-test/playwright-test-fixtures.tsindex cab6454a40..ef417c507f 100644--- a/tests/playwright-test/playwright-test-fixtures.ts+++ b/tests/playwright-test/playwright-test-fixtures.ts@@ -195,7 +195,6 @@ function watchPlaywrightTest(childProcess: CommonFixtures['childProcess'], baseDconst outputDir = path.join(baseDir, 'test-results');const args = ['test'];args.push('--output=' + outputDir);- args.push('--watch');args.push('--workers=2', ...paramList);if (options.additionalArgs)args.push(...options.additionalArgs);@@ -205,7 +204,7 @@ function watchPlaywrightTest(childProcess: CommonFixtures['childProcess'], baseDcommand.push(...args);const testProcess = childProcess({command,- env: cleanEnv(env),+ env: cleanEnv({ PWTEST_WATCH: '1', ...env }),cwd,});return testProcess;