diff --git a/src/components/AiWorkspace.test.tsx b/src/components/AiWorkspace.test.tsx index bed2c5e2..02349083 100644 --- a/src/components/AiWorkspace.test.tsx +++ b/src/components/AiWorkspace.test.tsx @@ -528,9 +528,11 @@ describe('AiWorkspace', () => { vaultPath: '/tmp/vault', })) expect(screen.getAllByRole('button', { name: 'Archive chat' }).some((button) => !button.hasAttribute('disabled'))).toBe(true) - expect(onConversationSettingsChange).toHaveBeenLastCalledWith([ - expect.objectContaining({ title: 'Quarterly sponsor outreach' }), - ]) + await waitFor(() => { + expect(onConversationSettingsChange).toHaveBeenLastCalledWith([ + expect.objectContaining({ title: 'Quarterly sponsor outreach' }), + ]) + }) }) it('renames a persisted default chat title after the first assistant reply', async () => {