Files
Matiss Janis Aboltins ff4d880313 [AI] Use fixed version for Playwright tests (#7965)
* [AI] Pin Electron Playwright version to 99.9.9

The version number at the bottom of the Management page is sourced from
package.json via app.getVersion(), so each release rotates the dynamic
version string in VRT screenshots. The browser bundle already swaps in a
static '99.9.9' for Playwright (browser-preload.js); mirror that in the
Electron bootstrap data so desktop VRT snapshots don't break on version
bumps.

Existing snapshots need to be regenerated once (via /update-vrt on the PR)
since they were captured with the live package.json version.

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #7965

* [AI] Pin Playwright server version to 99.9.9

The Management page footer also renders the sync server version, which
'get-server-version' fetches from the sync-server's /info endpoint (its
own package.json). Short-circuit getServerVersion() to '99.9.9' when
running under Playwright so VRT snapshots stay stable across releases.

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #7965

* [AI] Set 'playwright' userAgent on Electron BrowserWindow under Playwright

playwright.config.ts only sets userAgent for direct chromium launches —
_electron.launch() leaves the BrowserWindow with Chromium's default UA, so
Platform.isPlaywright (which checks navigator.userAgent) is false in the
renderer. That's why the ServerContext shortcut wasn't pinning the server
version for desktop VRT snapshots. Force the UA on the webContents when
EXECUTION_CONTEXT=playwright so renderer-side Playwright checks light up.

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #7965

* [AI] Preserve Electron substring in Playwright userAgent

Replacing the Electron renderer's UA with bare 'playwright' broke
environment.isElectron() (it greps for 'Electron' in navigator.userAgent),
which rerouted ConfigServer.tsx into the external-server branch — the
sync-server e2e test could no longer find the Start button to navigate to
the bootstrap page, so its snapshot kept falling through every
/update-vrt unchanged.

Append ' playwright' to the existing Electron UA instead, and widen the
Platform.isPlaywright check to a substring match so both
'playwright' (chromium tests) and 'Electron/… playwright' (electron tests)
resolve to true.

* Update VRT screenshots

Auto-generated by VRT workflow

PR: #7965

* Add release notes for PR #7965

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-05-29 20:11:47 +00:00
..