diff --git a/packages/app/src/__tests__/archyIntegration.test.ts b/packages/app/src/__tests__/archyIntegration.test.ts index c2c0c7c6..4f57a3c7 100644 --- a/packages/app/src/__tests__/archyIntegration.test.ts +++ b/packages/app/src/__tests__/archyIntegration.test.ts @@ -55,7 +55,7 @@ describe('archyBridge: postMessage protocol', () => { archyBridge.init() expect(window.parent.postMessage).toHaveBeenCalledWith( { type: 'ready' }, - '*', + window.location.origin, ) archyBridge.destroy() }) @@ -72,7 +72,7 @@ describe('archyBridge: postMessage protocol', () => { type: 'context:request', category: 'apps', }), - '*', + window.location.origin, ) archyBridge.destroy() @@ -91,7 +91,7 @@ describe('archyBridge: postMessage protocol', () => { action: 'open-app', params: { appId: 'mempool' }, }), - '*', + window.location.origin, ) archyBridge.destroy() @@ -104,7 +104,7 @@ describe('archyBridge: postMessage protocol', () => { expect(window.parent.postMessage).toHaveBeenCalledWith( { type: 'theme:request' }, - '*', + window.location.origin, ) archyBridge.destroy() }) diff --git a/packages/app/src/__tests__/useAI.test.ts b/packages/app/src/__tests__/useAI.test.ts index bd30a622..3a8dfda7 100644 --- a/packages/app/src/__tests__/useAI.test.ts +++ b/packages/app/src/__tests__/useAI.test.ts @@ -223,8 +223,9 @@ describe('useAI', () => { expect(chatStore.isStreaming).toBe(false) await sendMessage('hi') expect(chatStore.isStreaming).toBe(false) - // During the fetch call, isStreaming should have been true - expect(streamingStates[0]).toBe(true) + // During the streaming fetch call, isStreaming should have been true + // (earlier non-streaming fetches like refreshWavlakeCatalog may also be captured) + expect(streamingStates.some(s => s === true)).toBe(true) }) it('handles stream errors gracefully', async () => {