Repository navigation
Update Playwright to 1.65.1 - #274
Conversation
With Node's default keep-alive, 5 s, the test servers closed most of the browser's connections between spec files, and the browser opened new ones: a whole run on Windows 11 opened about 120 on the shared page. On Windows each new connection takes a random local port, which at times fails with net::ERR_NO_BUFFER_SPACE, and every spec file importing the module it was for then failed to import. The KeptConnections plugin keeps both servers' idle connections for 10 minutes, past any gap in a run, so the shared page opens about 30, all at its start. Issue: #30 Agent: DEV5 (developer) Agent-Model: Anthropic Opus 5.5, Medium
A Node response header can be a list, which the scripts type-check refused. Agent: DEV5 (developer) Agent-Model: Anthropic Opus 5.5, Medium
Playwright 1.65.0 turns off the Windows TcpPortRandomizationWin feature in the Chromium it launches (microsoft/playwright#43605). With that feature, a new connection at times failed with net::ERR_NO_BUFFER_SPACE, and every spec file importing the module it was for failed to import. Issue: #30 Agent: DEV5 (developer) Agent-Model: Anthropic Opus 5.5, Medium
The unit test checked KeptConnections only on a server of its own, so leaving the plugin out of the config, or the builder no longer passing it on, kept every check green. Agent: DEV5 (developer) Agent-Model: Anthropic Opus 5.5, Medium
Agent: DEV5 (developer) Agent-Model: Anthropic Opus 5.5, Medium
Agent: DEV5 (developer) Agent-Model: Anthropic Opus 5.5, Medium
|
Flake proof at 789c617: https://github.com/noldova-com/ui-components/actions/runs/46411669710. The whole suite ran 10 times on Windows x64 and 10 on Windows arm64, and every run passed. No job logged #274 at 789c617: ready, closes #30. Agent: DEV5 (developer) |
|
#274 at 789c617: ready, closes #30. Agent: DEV5 (developer) |
rostislavrotaru
left a comment
There was a problem hiding this comment.
Reviewed: #274 at 789c617
Verdict: Approve
Findings: 0 Should fix, 0 Low, as line comments
Why it's right: Playwright moves from 1.63.0 to 1.65.1, which turns off Chromium's Windows port randomization, the source of ERR_NO_BUFFER_SPACE. Every pin and lock line moved together. The release-note review covers each breaking change and why it doesn't apply. The look specs pass unchanged on 3 systems, and the flake proof passed 10/10 on Windows x64 and arm64.
Agent: LEAD (lead)
Agent-Model: Anthropic Opus 5.5, High
Closes #76 The second of the issue's two steps, stacked on #307, which keeps the window test servers' connections open. This ports noldova-com/ui-components#274. ## Cause, measured (#76's first done-when) The failing requests were new connections, and the cause had two parts. - **Connection churn.** The window test servers closed idle connections after Node's 5 s default, so the browser kept opening new ones. A whole window run on Windows 11 opened 61 connections, 40 of them after the server had closed one idle. #307 keeps the connections for 10 minutes, and the run now opens 30, all at the page's start. - **Random-port connects on Windows.** Each new connection got a random local port from Chromium's `TcpPortRandomizationWin`, and that connect at times failed with `net::ERR_NO_BUFFER_SPACE`. Playwright fixed this upstream in microsoft/playwright#43605, released in 1.65.0, by turning the feature off. This PR takes it. ## Why On Windows 11, Chromium's `TcpPortRandomizationWin` feature gives each new connection a random local port. That connect at times fails with `net::ERR_NO_BUFFER_SPACE`, and every window spec file importing the module it was for then fails to import. Playwright 1.65.0 turns the feature off in the Chromium it launches (microsoft/playwright#43605). We pinned 1.63.0. ## Change - `src/noldova.desktop.window.app/package.json`: `playwright` goes from 1.63.0 to 1.65.1, for the window tests' browser. - `package.json`: `@playwright/test` goes from 1.63.0 to 1.65.1, for the Electron end-to-end specs, so the lockfile keeps one Playwright copy. - `package-lock.json`: `@playwright/test`, `playwright` and `playwright-core` go to 1.65.1, with the registry's tarball URLs and integrity hashes. Their dependencies, engines (`node >=20`) and bins are unchanged, so nothing else moves. ### Differences from the source ui-components#274 moved only `playwright`. Desktop also has Playwright's test runner, so this PR moves `@playwright/test` too, and the review below covers the runner's changes. ## Release notes reviewed: 1.64.0, 1.64.1, 1.65.0, 1.65.1 - **Browsers:** the window tests' browser moves from Chromium 153.0.8010.12 to 159.0.8154.6, still the headless shell that the build installs. The end-to-end specs drive the app's own Electron, which this doesn't change. - **1.64.0's breaking changes:** - `screen` is now forwarded from device descriptors. No config here uses one. - Elements inside a hidden iframe now count as hidden. Vitest's spec iframe is visible, and the end-to-end specs read web views' frames through the main process, not Playwright's actions. - JSX in test files follows `tsconfig.json`; the specs have no JSX. - `--update-snapshots=missing` passes; no spec here compares snapshots. - **1.64.1** fixes `_electron.launch` sometimes losing a packaged app's first window, a regression from 1.64.0. The end-to-end fixture, `src/noldova.desktop.electron/tests/e2e/fixtures/main-process.fixture.ts`, waits for that first window. - **1.65.0's notable changes:** - TypeScript class fields now follow `useDefineForClassFields`, which is on for the repository's ES2025 target. A field initializer that reads a constructor parameter property breaks under it. The specs and fixtures have no parameter properties. Their subclasses, the exceptions, only add fields set in the constructor. The decorated components are fixture modules that Angular builds, not Playwright. - Actions such as `click`, `check`, `fill` and `selectOption` now wait for their element not to be inert, and time out if it stays inert. The window does use `inert`: - the workspace while it reconnects (`workspace.component.ts`); - the page behind a dialog (`dialog-cover.service.ts`); - a folded window row's content (`window-row.component.html`); - a live view while it is held (`models/live-view.ts`). No end-to-end test acts on inert content, so none waits under the new rule: CI's end-to-end run and the window flake proof pass. - A sharded run with no tests in any shard now fails. Every CI shard here has specs. - Test locations of CommonJS calls move to the callee's start. The specs are ESM, so nothing moves. - Blob reports clear their folder again. This repository doesn't use the blob reporter. - The rest, cookie matching, proxy credentials and `APIRequestContext` params, isn't used here, and `.css` imports aren't used in the specs. - Accessible names and aria snapshots now leave out text the browser doesn't render, such as text in a closed `<details>`. The end-to-end specs query by role and name, such as `getByRole("dialog", { name: "Work is still running" })`. `main-process.fixture.ts:557` reads a question's text with `ariaSnapshot()`. Each names rendered text, so neither should change; CI's full end-to-end run checks every one. - **1.65.1** fixes two runner regressions: decorated classes with static fields, and locations under Bun. - **Installation:** none of the three packages has an install script. 1.65.1 has been published since 2026-11-13. ## Checks - **Before the push,** on Linux, macOS and Windows after `npm ci` and `npm run build` (one copy of each package, all 1.65.1): - the window specs `test-server-connections`, `test-server-address` and `failed-module-requests` pass; - `activity-bar.spec.ts` and `bar-edges.spec.ts`, run as `--shard=1/2` and `--shard=2/2`, pass. Every spec launches through the fixture above, so this covers the first window, a sharded set, and a fixture class with field initializers. - **CI** passed: the whole suite on every target, and the end-to-end specs on Linux x64, each shard within the times of main's and other PRs' runs (see the comment). - **The flake proof** at 9155a30, every window spec on Windows arm64, passed 10 of 10 runs of all 282 spec files, with no `ERR_NO_BUFFER_SPACE` logged. ## Not checked - The end-to-end specs on Windows and macOS with 1.65.1 beyond the two specs above. A PR's CI runs them on Linux only, and main's end-to-end workflow runs Windows x64 after the merge. Agent: DEV5 (developer) Agent-Model: Anthropic Opus 5.5, Medium
Closes #286 Moves the kit to 0.0.48, with what has merged since 0.0.47, so apps can take the binary file note and the path tooltip from #282, and the tab marker's tone, close place and dot from #299. ## What changes - `version.json` is at 0.0.48. - `CHANGELOG.md` has the 0.0.48 section, one entry per change a consumer or docs-site reader sees, from #303 (#299), #291 (#280), #281 (#275), #285 (#282), #263 (#151), #250 (#245), #262 (#138, #223), #260 (#16), #248 (#233), #258 (#18), #268 (#28), #255 (#234), #254 (#239), #256 (#236), #253 (#238), #252 (#160), #249 (#244), #242 (#231), #269 (#261) and #259 (#26). - Left out, as changing nothing the package or the docs site shows: #251 (the header's phone-bar rules written once, the same look), #247 (workflow pins), #264 and #277 (build scripts), #266 (example names and their check), #267, #271, #272, #273, #274, #276, #289 and #290 (tests and their tools), #279 and #295 (workflow pins). ## Checks No test covers these two files. The product names check reads the new section in CI; it names no product. Agent: DEV2 (developer) Agent-Model: Anthropic Opus 5.5, Medium
Closes #30
The second of the issue's two steps; the first, #273, keeps the test servers' connections open, so a run opens about half as many.
Why
On Windows 11, Chromium's
TcpPortRandomizationWinfeature gives each new connection a random local port. That connect at times fails withnet::ERR_NO_BUFFER_SPACE, and every spec file importing the module it was for then fails to import. Playwright 1.65.0 turns the feature off in the Chromium it launches (microsoft/playwright#43605). We pinned 1.63.0.Change
src/noldova.ui.components.angular/package.jsonandsrc/noldova.ui.components.angular.docs/package.json:playwrightgoes from 1.63.0 to 1.65.1.package-lock.json:playwrightandplaywright-corego to 1.65.1, with the registry's tarball URLs and integrity hashes. Their dependencies, engines (node >=20) and bins are unchanged, so nothing else in the lockfile moves.Release notes reviewed: 1.64.0, 1.64.1, 1.65.0, 1.65.1
playwright install --only-shell chromium.testProject.default; none is used here.screenis now forwarded from device descriptors. Neither config uses a device descriptor (devices[...]), sowindow.screenis unchanged.tsconfig.json, and--update-snapshots=missingpasses. Both are in Playwright's own test runner, which the kit doesn't use.useDefineForClassFieldsin its transpiler, shard and location handling,.cssimports), which the kit doesn't use: Vitest runs the specs and only launches the browser through Playwright. Of its library changes, cookie matching, proxy credentials andAPIRequestContextparams aren't used; accessible names now leave out text the browser doesn't render, which no spec reads through Playwright.No look check moved: every spec in the run below passed unchanged.
Checks
npm ciand the Chromium 159 install, the pixel-reading specs (settled-pixels,forced-highlights,forced-spans,lines), the screenshot specs (screenshot.fixture,short-screenshot-names,avatar.component,configuration-table-row-hover,dialog.component,diff-view.component,mention-field-chips),emulated-mediaand the network specs (kept-connections,test-server-address,failed-module-requests,code-block-spans) pass: 276 tests in the shared run and 38 in the isolated one, on each system.net::ERR_NO_BUFFER_SPACElogged.Agent: DEV5 (developer)
Agent-Model: Anthropic Opus 5.5, Medium