Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

test(e2e): measure native window bounds

Louis Beaumont623421c0c701
diff --git a/apps/screenpipe-app-tauri/e2e/specs/brain-overview.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/brain-overview.spec.ts
index 71d4b6d78..c75245bac 100644
--- a/apps/screenpipe-app-tauri/e2e/specs/brain-overview.spec.ts
+++ b/apps/screenpipe-app-tauri/e2e/specs/brain-overview.spec.ts
@@ -262,10 +262,11 @@ describe("Brain Live Views", function () {
return rect.width > 0 && rect.height > 0;
});
return {
- // innerWidth is the CSS viewport requested through WebDriver.
- // documentElement.clientWidth excludes the vertical scrollbar,
- // which is 16px on Windows and 2px in the Linux CI webview.
- windowWidth: window.innerWidth,
+ // WebDriver sizes the native outer window. Its content viewport is
+ // smaller by the platform window frame (16px on Windows, 2px in the
+ // Linux CI webview), so assert the requested size against outerWidth
+ // and keep clientWidth for the clipping/overflow assertions below.
+ windowWidth: window.outerWidth,
viewportWidth: document.documentElement.clientWidth,
documentWidth: document.documentElement.scrollWidth,
sectionLeft: sectionRect.left,