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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
test(app): mock primary window in entitlement-gate resume test
Louis Beaumontf62ba66f4549
diff --git a/apps/screenpipe-app-tauri/components/app-entitlement-gate.test.tsx b/apps/screenpipe-app-tauri/components/app-entitlement-gate.test.tsxindex f456b1073..1c7f35308 100644--- a/apps/screenpipe-app-tauri/components/app-entitlement-gate.test.tsx+++ b/apps/screenpipe-app-tauri/components/app-entitlement-gate.test.tsx@@ -41,6 +41,13 @@ vi.mock("@/lib/utils/tauri", () => ({vi.mock("posthog-js", () => ({ default: { capture: mocks.capture } }));vi.mock("@tauri-apps/plugin-shell", () => ({ open: mocks.open }));+// The resume effect only restarts the engine from the primary window, which it+// detects via getCurrentWindow().label. Stand in as the primary "main" window so+// the sequenced stop -> settle -> spawn actually runs under test.+vi.mock("@tauri-apps/api/window", () => ({+ getCurrentWindow: () => ({ label: "main" }),+}));+import { AppEntitlementGate } from "./app-entitlement-gate";// Build timestamps relative to the real clock so freshness checks are stable