From a59e3620663175f57669d11b98c909e759f04c33 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 31 Oct 2026 01:14:27 +0000 Subject: [PATCH] test(playwright-patch): read the 1.62.1 backport patch by literal path so pregate maps the patch to its test Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- browse/test/playwright-core-patch.test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/browse/test/playwright-core-patch.test.ts b/browse/test/playwright-core-patch.test.ts index 8467e4523..f0974cbd3 100644 --- a/browse/test/playwright-core-patch.test.ts +++ b/browse/test/playwright-core-patch.test.ts @@ -63,11 +63,10 @@ describe('playwright-core windowsHide patch (#2160, #1989)', () => { // Windows Free Tests 40656299153 and 41056150287 (cookie-picker-ui, serial retry passed): goto failed with // net::ERR_NO_BUFFER_SPACE on 127.0.0.1. Chromium's TcpPortRandomizationWin raises WSAENOBUFS with ports free; -// microsoft/playwright#43605 disables it in 1.65, and the patch backports that to the pinned version. +// microsoft/playwright#43605 disables it in 1.65, and the 1.62.1 patch backports it; drop this block at 1.65. describe('playwright-core TcpPortRandomizationWin backport (microsoft/playwright#43605)', () => { test('the patch and the installed tree disable the feature in the --disable-features list', () => { - const version = installedPlaywrightCoreVersion(); - expect(fs.readFileSync(path.join(ROOT, 'patches', `playwright-core@${version}.patch`), 'utf-8')).toContain('+ "TcpPortRandomizationWin"'); + expect(fs.readFileSync(path.join(ROOT, 'patches', 'playwright-core@1.62.1.patch'), 'utf-8')).toContain('+ "TcpPortRandomizationWin"'); const bundle = fs.readFileSync(path.join(ROOT, 'node_modules', 'playwright-core', 'lib', 'coreBundle.js'), 'utf-8'); const list = bundle.slice(bundle.indexOf('disabledFeatures = ['), bundle.indexOf('].filter(Boolean);', bundle.indexOf('disabledFeatures = ['))); expect(list).toContain('"TcpPortRandomizationWin"');