Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

test(desktop): 对齐恢复入口守卫并等待授权通知

DavidShen9b449c40ff8e
diff --git a/apps/desktop/src/renderer/__tests__/githubSetup.test.tsx b/apps/desktop/src/renderer/__tests__/githubSetup.test.tsx
index 7313a65189..29c9667a46 100644
--- a/apps/desktop/src/renderer/__tests__/githubSetup.test.tsx
+++ b/apps/desktop/src/renderer/__tests__/githubSetup.test.tsx
@@ -35,7 +35,8 @@ describe('GitHub setup UI', () => {
await screen.findByText(`${key}.stages.preparing.title`);
await screen.findByText(`${key}.stages.unavailable.title`);
await screen.findByText(`${key}.done`, {}, { timeout: 2000 });
- expect(connected).toHaveBeenCalledOnce();
+ // The connected notification runs in a passive effect after the DOM commit.
+ await waitFor(() => expect(connected).toHaveBeenCalledOnce());
});
it('ignores outside clicks during authorization but still allows explicit cancellation', async () => {
const close = vi.fn();
diff --git a/apps/desktop/src/renderer/__tests__/orcaWorkflowRoute.test.ts b/apps/desktop/src/renderer/__tests__/orcaWorkflowRoute.test.ts
index 8eb80552d2..0b579ae233 100644
--- a/apps/desktop/src/renderer/__tests__/orcaWorkflowRoute.test.ts
+++ b/apps/desktop/src/renderer/__tests__/orcaWorkflowRoute.test.ts
@@ -453,7 +453,7 @@ describe('OrcaWorkflowRoute source invariants', () => {
/sidebarPanelHostSessionId=\{\s*ownsRoute \|\| navigationMode === 'split-pane' \? sessionId : undefined\s*\}/,
);
expect(sessionViewSource).toContain(
- '!readOnly && canNavigateSession ? handleForkStripEncrypted : undefined',
+ '!readOnly && canNavigateSession && !isSharedTaskPeer(remoteDeviceId) ? handleForkStripEncrypted : undefined',
);
});