Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

test: wait for Data Manager subscription before reconnect

[._.]/ Adam Eivyfd82277c80a8
diff --git a/client/src/pages/DataManager.test.jsx b/client/src/pages/DataManager.test.jsx
index ddb1c83058..bd996371b2 100644
--- a/client/src/pages/DataManager.test.jsx
+++ b/client/src/pages/DataManager.test.jsx
@@ -64,6 +64,9 @@ describe('DataManager tombstone GC peer-refusal subscription (#8110)', () => {
await waitFor(() => expect(screen.getByText(UNKNOWN_DESCRIPTION)).toBeInTheDocument());
const initialCalls = getTombstoneSweepStatus.mock.calls.length;
+ // The page data can render before the child subscription's passive effect
+ // runs, especially while the full client suite is under load.
+ await waitFor(() => expect(socket.on).toHaveBeenCalledWith('connect', expect.any(Function)));
const connectHandler = socket.on.mock.calls.find(([event]) => event === 'connect')?.[1];
expect(connectHandler).toBeTypeOf('function');
socket.emit.mockClear();