mirror of
https://github.com/BigBodyCobain/Shadowbroker.git
synced 2026-06-23 14:30:05 +02:00
Fix frontend CI after Meshtastic Chat panel refactor.
Update gate-resync decomposition expectations for Infonet embed and harden GateView stream snapshot waits for slower CI runners. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -539,15 +539,16 @@ describe('GateView compat-decrypt UX', () => {
|
||||
);
|
||||
|
||||
expect(await screen.findByText('sealed')).toBeInTheDocument();
|
||||
expect(mocks.subscribeGateSessionStreamEvents).toHaveBeenCalled();
|
||||
expect(mocks.fetchWormholeGateKeyStatus).toHaveBeenCalledWith(
|
||||
'infonet',
|
||||
expect.objectContaining({ mode: 'session_stream' }),
|
||||
await waitFor(() => expect(mocks.subscribeGateSessionStreamEvents).toHaveBeenCalled());
|
||||
await waitFor(() =>
|
||||
expect(mocks.fetchWormholeGateKeyStatus).toHaveBeenCalledWith(
|
||||
'infonet',
|
||||
expect.objectContaining({ mode: 'session_stream' }),
|
||||
),
|
||||
);
|
||||
expect(mocks.controlPlaneJson).not.toHaveBeenCalled();
|
||||
waitSnapshotSpy.mockClear();
|
||||
await new Promise((resolve) => setTimeout(resolve, 0));
|
||||
expect(waitSnapshotSpy).not.toHaveBeenCalled();
|
||||
await waitFor(() => expect(waitSnapshotSpy).not.toHaveBeenCalled(), { timeout: 2000 });
|
||||
|
||||
streamEventListeners.forEach((listener) =>
|
||||
listener({
|
||||
@@ -560,12 +561,14 @@ describe('GateView compat-decrypt UX', () => {
|
||||
}),
|
||||
);
|
||||
|
||||
await waitFor(() =>
|
||||
expect(fetchSnapshotSpy).toHaveBeenCalledWith(
|
||||
'infonet',
|
||||
40,
|
||||
expect.objectContaining({ force: true, proofMode: 'session_stream' }),
|
||||
),
|
||||
await waitFor(
|
||||
() =>
|
||||
expect(fetchSnapshotSpy).toHaveBeenCalledWith(
|
||||
'infonet',
|
||||
40,
|
||||
expect.objectContaining({ force: true, proofMode: 'session_stream' }),
|
||||
),
|
||||
{ timeout: 5000 },
|
||||
);
|
||||
expect(
|
||||
fetchMock.mock.calls.some(([input]) =>
|
||||
|
||||
@@ -221,9 +221,17 @@ describe('MeshChat decomposition — export stability', () => {
|
||||
expect(index).toMatch(/export\s+default\s+MeshChat/);
|
||||
});
|
||||
|
||||
it('presentational shell exposes the gate resync affordance', () => {
|
||||
const index = readFile('index.tsx');
|
||||
expect(index).toContain('RESYNC GATE STATE');
|
||||
expect(index).toContain('handleResyncGateState(selectedGate)');
|
||||
it('gate resync is controller-owned and exposed via Infonet / Mesh Terminal surfaces', () => {
|
||||
const controller = readFile('useMeshChatController.ts');
|
||||
const panel = readFile('InfonetTerminalPanel.tsx');
|
||||
const terminal = fs.readFileSync(
|
||||
path.resolve(MESH_CHAT_DIR, '../MeshTerminal.tsx'),
|
||||
'utf-8',
|
||||
);
|
||||
expect(controller).toContain('handleResyncGateState');
|
||||
expect(controller).toContain('resyncWormholeGateState');
|
||||
expect(panel).toContain('InfonetShell');
|
||||
expect(terminal).toContain('gate resync');
|
||||
expect(terminal).toContain('resyncWormholeGateState');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user