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: nuke bad test (#40534)
Pavel Feldman5c9a89a12d10
diff --git a/tests/config/browserTest.ts b/tests/config/browserTest.tsindex c34ebce180..dce99d775f 100644--- a/tests/config/browserTest.ts+++ b/tests/config/browserTest.ts@@ -65,7 +65,6 @@ const test = baseTest.extend<BrowserTestTestFixtures, BrowserTestWorkerFixtures>}, { scope: 'worker' }],browserType: [async ({ playwright, browserName, mode }, run) => {- test.skip(mode === 'service2');await run(playwright[browserName]);}, { scope: 'worker' }],diff --git a/tests/library/chromium/connect-over-cdp.spec.ts b/tests/library/chromium/connect-over-cdp.spec.tsindex 8876604d9b..f68634fa55 100644--- a/tests/library/chromium/connect-over-cdp.spec.ts+++ b/tests/library/chromium/connect-over-cdp.spec.ts@@ -24,8 +24,6 @@ import { suppressCertificateWarning } from '../../config/utils';const { nullProgress } = coreServer;type Frame = coreServer.Frame;-test.skip(({ mode }) => mode === 'service2');-test('should connect to an existing cdp session', async ({ browserType, mode }, testInfo) => {const port = 9339 + testInfo.workerIndex;const browserServer = await browserType.launch({diff --git a/tests/library/chromium/connect-to-worker.spec.ts b/tests/library/chromium/connect-to-worker.spec.tsindex 43067608e7..11acb2a5d5 100644--- a/tests/library/chromium/connect-to-worker.spec.ts+++ b/tests/library/chromium/connect-to-worker.spec.ts@@ -16,8 +16,6 @@import { playwrightTest as test, expect } from '../../config/browserTest';-test.skip(({ mode }) => mode === 'service2');-test('should connect, evaluate, receive console and disconnect', async ({ browserType, childProcess }) => {const child = childProcess({ command: [process.execPath, '--inspect-brk=0', '-e', 'console.log("hello from node"); setTimeout(() => {}, 1e9)'] });await child.waitForOutput('Debugger listening on ws://');diff --git a/tests/library/playwright.config.ts b/tests/library/playwright.config.tsindex 37601dc406..966cc30a69 100644--- a/tests/library/playwright.config.ts+++ b/tests/library/playwright.config.ts@@ -53,9 +53,6 @@ const reporters = () => {return result;};-const os: 'linux' | 'windows' = (process.env.PLAYWRIGHT_SERVICE_OS as 'linux' | 'windows') || 'linux';-const runId = process.env.PLAYWRIGHT_SERVICE_RUN_ID || new Date().toISOString(); // name the test run-let connectOptions: any;let webServer: Config['webServer'];diff --git a/tests/library/signals.spec.ts b/tests/library/signals.spec.tsindex f2a94b746f..5eec86366a 100644--- a/tests/library/signals.spec.ts+++ b/tests/library/signals.spec.ts@@ -23,7 +23,6 @@ import os from 'os';test.slow();test('should close the browser when the node process closes', async ({ startRemoteServer, isWindows, server, mode }) => {- test.skip(mode === 'wsl', 'Remove server cannot start on Windows with WebKit WSL params');const remoteServer = await startRemoteServer('launchServer', { url: server.EMPTY_PAGE });try {if (isWindows)diff --git a/tests/mcp/cli-session.spec.ts b/tests/mcp/cli-session.spec.tsindex a299f81f08..98dd2bec49 100644--- a/tests/mcp/cli-session.spec.ts+++ b/tests/mcp/cli-session.spec.ts@@ -15,7 +15,6 @@*/import fs from 'fs';-import os from 'os';import path from 'path';import { test, expect, daemonFolder } from './cli-fixtures';import { killProcessGroup } from '../config/commonFixtures';@@ -32,21 +31,6 @@ test('list', async ({ cli, server }) => {expect(listOutput).toContain('- default:');});-test('list shows sessions when cwd has no .playwright directory', async ({ cli, server }) => {- // Temp dir must have no .playwright ancestor so findWorkspaceDir returns undefined- // and the registry key falls back to workspaceDirHash.- const tmpDir = await fs.promises.mkdtemp(path.join(os.tmpdir(), 'pw-no-workspace-'));- try {- await cli('open', server.HELLO_WORLD, { cwd: tmpDir });-- const { output } = await cli('list', { cwd: tmpDir });- expect(output).toContain('### Browsers');- expect(output).toContain('- default:');- } finally {- await fs.promises.rm(tmpDir, { recursive: true, force: true }).catch(() => {});- }-});-test('close', async ({ cli, server }) => {await cli('open', server.HELLO_WORLD);diff --git a/tests/page/page-goto.spec.ts b/tests/page/page-goto.spec.tsindex 3e7dffaa1c..a3f518665b 100644--- a/tests/page/page-goto.spec.ts+++ b/tests/page/page-goto.spec.ts@@ -360,23 +360,14 @@ it('should fail when main resources failed to load', async ({ page, browserName,it.skip(channel === 'webkit-wsl', 'Networking mode mirrored ends up stalling connections rather than terminating them, see https://github.com/microsoft/WSL/issues/10855.');let error = null;await page.goto('http://localhost:44123/non-existing-url').catch(e => error = e);- if (browserName === 'chromium') {- if (mode === 'service2')- expect(error.message).toContain('net::ERR_SOCKS_CONNECTION_FAILED');- else- expect(error.message).toContain('net::ERR_CONNECTION_REFUSED');- } else if (browserName === 'webkit' && isWindows && mode === 'service2') {- expect(error.message).toContain(`proxy handshake error`);- } else if (browserName === 'webkit' && isWindows && channel !== 'webkit-wsl') {+ if (browserName === 'chromium')+ expect(error.message).toContain('net::ERR_CONNECTION_REFUSED');+ else if (browserName === 'webkit' && isWindows && channel !== 'webkit-wsl')expect(error.message).toContain(`Could not connect to server`);- } else if (browserName === 'webkit') {- if (mode === 'service2')- expect(error.message).toContain('Connection refused');- else- expect(error.message).toContain('Could not connect');- } else {+ else if (browserName === 'webkit')+ expect(error.message).toContain('Could not connect');+ elseexpect(error.message).toContain('NS_ERROR_CONNECTION_REFUSED');- }});it('should fail when exceeding maximum navigation timeout', async ({ page, server, playwright }) => {