Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure
TypeScript
test(desktop): r2-l2 strengthen deep-link assertions
Josuée7b77efbbc21
diff --git a/desktop-app/src/__tests__/sandboxUiDriver.test.ts b/desktop-app/src/__tests__/sandboxUiDriver.test.tsindex 7c981dae8..971f07cf1 100644--- a/desktop-app/src/__tests__/sandboxUiDriver.test.ts+++ b/desktop-app/src/__tests__/sandboxUiDriver.test.ts@@ -23,6 +23,7 @@ describe('applySandboxUiClientRoute', () => {expect(applied).toBe(true)expect(executeJavaScript).toHaveBeenCalledOnce()+ expect(executeJavaScript.mock.calls[0]?.[0]).toContain('/tasks/task-42')expect(executeJavaScript.mock.calls[0]?.[0]).toContain('window.history.replaceState')expect(executeJavaScript.mock.calls[0]?.[0]).toContain("PopStateEvent('popstate'")})diff --git a/desktop-app/ui/src/__tests__/App.deepLinks.test.tsx b/desktop-app/ui/src/__tests__/App.deepLinks.test.tsxindex 69a971841..0b6b8355c 100644--- a/desktop-app/ui/src/__tests__/App.deepLinks.test.tsx+++ b/desktop-app/ui/src/__tests__/App.deepLinks.test.tsx@@ -248,6 +248,13 @@ describe('App deep-link orchestration', () => {emitDeepLink?.({ id: 1, appRef: 'ns/app' })})+ await act(async () => {+ await Promise.resolve()+ })+ expect(confirmDialogHarness.props).toBeNull()+ expect(currentController.handleNavSelect).not.toHaveBeenCalledWith(DESKTOP_ROUTES.apps)+ expect(acknowledgeDeepLink).not.toHaveBeenCalled()+currentController = makeController({ initialExperienceLoading: false })rerender(<App />)@@ -498,7 +505,7 @@ describe('App deep-link orchestration', () => {announce: true,})expect(currentController.pushToast).not.toHaveBeenCalledWith(- expect.stringContaining("don't have access to the linked team"),+ "Could not open app link: You don't have access to this app in the linked team",'error')})@@ -571,6 +578,10 @@ describe('App deep-link orchestration', () => {expect.stringContaining('bridge unavailable'),'error')+ expect(consoleWarn).toHaveBeenCalledWith(+ '[Desktop] Could not acknowledge app deep link:',+ expect.objectContaining({ message: 'bridge unavailable' })+ )consoleWarn.mockRestore()})diff --git a/desktop-app/ui/src/lib/__tests__/sandboxUiDeepLinkState.test.ts b/desktop-app/ui/src/lib/__tests__/sandboxUiDeepLinkState.test.tsindex 2a12c9736..2e2a61a9f 100644--- a/desktop-app/ui/src/lib/__tests__/sandboxUiDeepLinkState.test.ts+++ b/desktop-app/ui/src/lib/__tests__/sandboxUiDeepLinkState.test.ts@@ -243,10 +243,12 @@ describe('pending sandbox UI deep-link state', () => {pending = deferPendingSandboxUiDeepLink(pending, 1, 10_000)expect(pending[0]?.retryCount).toBe(1)- expect(pending[0]?.nextRetryAt).toBe(10_000 + nextSandboxUiDeepLinkRetryDelayMs(0))- expect(nextSandboxUiDeepLinkRetryDelayMs(MAX_SANDBOX_UI_DEEP_LINK_RETRY_ATTEMPTS + 10)).toBe(- 15_000- )+ expect(pending[0]?.nextRetryAt).toBe(11_000)+ expect(+ [0, 1, 2, 3, 4, MAX_SANDBOX_UI_DEEP_LINK_RETRY_ATTEMPTS + 10].map(+ nextSandboxUiDeepLinkRetryDelayMs+ )+ ).toEqual([1_000, 2_000, 4_000, 8_000, 15_000, 15_000])pending = failPendingSandboxUiDeepLink(pending, 1, 'native mount failed')expect(pending[0]?.failedMessage).toBe('native mount failed')