Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

test(desktop): verify sandbox find teardown

Josué3bdcdd942377
diff --git a/desktop-app/src/__tests__/sandboxUiDriverLifecycle.test.ts b/desktop-app/src/__tests__/sandboxUiDriverLifecycle.test.ts
index abf15dfe9..a6d88a3d0 100644
--- a/desktop-app/src/__tests__/sandboxUiDriverLifecycle.test.ts
+++ b/desktop-app/src/__tests__/sandboxUiDriverLifecycle.test.ts
@@ -21,6 +21,7 @@ const electronMocks = vi.hoisted(() => {
this.currentUrl = url
})
setWindowOpenHandler = vi.fn()
+ stopFindInPage = vi.fn()
on(event: string, handler: (...args: unknown[]) => void): this {
if (!this.listeners.has(event)) this.listeners.set(event, new Set())
@@ -193,6 +194,9 @@ describe('mountSandboxUiView lifecycle cleanup', () => {
await unmountSandboxUiView()
expect(parentWindow.listenerCount('closed')).toBe(0)
+ expect(electronMocks.views[0]?.webContents.stopFindInPage).toHaveBeenCalledWith(
+ 'clearSelection'
+ )
parentWindow.emit('closed')
expect(onClosed).not.toHaveBeenCalled()
})