fix(tests): resolve 4 post-phase test failures
- platformClients.integration: iOS/Android push tests lacked setStatus() call before listNodes(), so platform filter excluded nodes. Added publishHeartbeat() to set platform on connection state. - server.test: agent.send now emits run_state events before done (Phase 1). Added sendAndWaitForDone() helper and updated test to find done event rather than assuming index 0. - handlers.test: updated agent.send/cancel assertions to use find() and pass send arg to agent.cancel, consistent with run_state events. - httpBody: req.destroy() closed socket before 413 response could be sent. Removed socket destruction from body reader; 413 responses now send Connection: close so Node closes the connection cleanly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -248,8 +248,11 @@ describe('ChatPage wiring', () => {
|
||||
await Promise.resolve();
|
||||
|
||||
const statusLine = Array.from(root.querySelectorAll('div'))
|
||||
.find((el: any) => String(el.textContent ?? '').startsWith('Run status:'));
|
||||
.find((el: any) => String(el.textContent ?? '').startsWith('Run status:')) as any;
|
||||
expect(statusLine).toBeTruthy();
|
||||
if (!statusLine) {
|
||||
throw new Error('Run status line not found');
|
||||
}
|
||||
expect(statusLine.classList.contains('hidden')).toBe(false);
|
||||
|
||||
resolveResult?.({ content: 'ok' });
|
||||
|
||||
Reference in New Issue
Block a user