Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(conversations): reformat composer surface test assertions

Steven Enamakel8e841a0c0013
diff --git a/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx b/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx
index cbdea0dbf1..89762ca98a 100644
--- a/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx
+++ b/app/src/pages/__tests__/Conversations.auiComposerSurfaces.test.tsx
@@ -341,14 +341,39 @@ describe('assistant-ui chat surface — composer-adjacent cards', () => {
expect(overlay).toBeNull();
expect(plan.closest('[data-slot="task-card-dock"]')).not.toBeNull();
expect(plan).toHaveAttribute('data-slot', 'task-card');
- await act(async () => store.dispatch(setThreadTodos({threadId: THREAD_ID, todos: [
- {content: 'Inspect the current UI', status: 'completed'},
- {content: 'Verify overlay geometry', status: 'completed'},
- ]})));
- await waitFor(() => expect(screen.getByTestId('todo-checklist')).toHaveAttribute('data-state', 'done'));
+ await act(async () =>
+ store.dispatch(
+ setThreadTodos({
+ threadId: THREAD_ID,
+ todos: [
+ { content: 'Inspect the current UI', status: 'completed' },
+ { content: 'Verify overlay geometry', status: 'completed' },
+ ],
+ })
+ )
+ );
+ await waitFor(() =>
+ expect(screen.getByTestId('todo-checklist')).toHaveAttribute('data-state', 'done')
+ );
await act(async () => {
- for (const [id, sender] of [['user-next', 'user'], ['agent-next', 'agent']] as const) {
- store.dispatch({type: addMessageLocal.fulfilled.type, payload: {threadId: THREAD_ID, message: {id, sender, content: 'Next conversation turn', type: 'text', extraMetadata: {}, createdAt: '2026-01-01T00:01:00Z'}}});
+ for (const [id, sender] of [
+ ['user-next', 'user'],
+ ['agent-next', 'agent'],
+ ] as const) {
+ store.dispatch({
+ type: addMessageLocal.fulfilled.type,
+ payload: {
+ threadId: THREAD_ID,
+ message: {
+ id,
+ sender,
+ content: 'Next conversation turn',
+ type: 'text',
+ extraMetadata: {},
+ createdAt: '2026-01-01T00:01:00Z',
+ },
+ },
+ });
}
});
const completed = screen.getByTestId('todo-checklist');
@@ -356,7 +381,6 @@ describe('assistant-ui chat surface — composer-adjacent cards', () => {
const owningMessage = completed.closest('[data-slot="aui_assistant-message-root"]');
expect(owningMessage).toHaveTextContent('Task turn');
expect(owningMessage).not.toHaveTextContent('Next conversation turn');
-
});
it('shows the send error when a send is rejected', async () => {