Files
open-design/apps/desktop/tests
fbc5fe3458 fix(desktop): scope window-chrome spec matching to the main app window block (#4216)
* fix(desktop): scope window-chrome spec matching to the main app window block

The backgroundThrottling and autoHideMenuBar specs extracted the
BrowserWindow options with a non-greedy whole-source regex anchored on
title: "Open Design" / width: 1280. Since the packaged brand splash
window (createSplashWindow) shares both markers and appears earlier in
runtime.ts, the regex locked onto the splash block: the
backgroundThrottling spec failed (splash intentionally has no
backgroundThrottling: false) and the autoHideMenuBar spec passed only
coincidentally against the wrong window.

Split the source into per-constructor option blocks and select the main
app window by the marker pair unique to it (app title + preload),
asserting exactly one match so a future fourth window fails loudly
instead of being checked ambiguously.

https://claude.ai/code/session_016MqkcZLEz3NzgNKgU2ARLd

* test(desktop): anchor window-chrome selector on the unique main-window declaration

Adopt the clearer anchor from the upstream fix: select the main app
window by the `const window = new BrowserWindow({` declaration, which is
unique to it, instead of the indirect title + preload marker pair. Keep
the exactly-one-match assertion so a rename or a duplicate declaration
fails loudly rather than silently inspecting the wrong window.

https://claude.ai/code/session_016MqkcZLEz3NzgNKgU2ARLd

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-14 08:55:14 +00:00
..