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): wait for Windows home route stability

Louis Beaumontefe9e6a58689
diff --git a/apps/screenpipe-app-tauri/e2e/specs/windows-system-integration.spec.ts b/apps/screenpipe-app-tauri/e2e/specs/windows-system-integration.spec.ts
index 8fb1aa9bb..4c312d32e 100644
--- a/apps/screenpipe-app-tauri/e2e/specs/windows-system-integration.spec.ts
+++ b/apps/screenpipe-app-tauri/e2e/specs/windows-system-integration.spec.ts
@@ -139,6 +139,14 @@ async function pageIsAlive(): Promise<boolean> {
);
}
+async function waitForPageAlive(timeoutMs = t(10_000)): Promise<void> {
+ await browser.waitUntil(pageIsAlive, {
+ timeout: timeoutMs,
+ interval: t(250),
+ timeoutMsg: "Home WebView did not become interactive after route change",
+ });
+}
+
describe("Windows system integration", function () {
this.timeout(180_000);
@@ -449,8 +457,7 @@ $uniqueNames = @($names | Sort-Object -Unique)
for (const page of routes) {
await showWindow({ Home: { page } });
await browser.switchToWindow("home");
- await browser.pause(200);
- expect(await pageIsAlive()).toBe(true);
+ await waitForPageAlive();
}
await showWindow({ Home: { page: "home" } });