瀏覽代碼

test(web): wait for seeded agent attachment

Dudu-0223 1 月之前
父節點
當前提交
eb60b74f47
共有 1 個文件被更改,包括 4 次插入 和 0 次删除
  1. 4 0
      apps/web/tests/chat-long-interactions.e2e.ts

+ 4 - 0
apps/web/tests/chat-long-interactions.e2e.ts

@@ -173,6 +173,10 @@ describe('web e2e: long Chat interaction contract', () => {
 
   it.skipIf(MODE === 'record')('keeps heterogeneous rows and their actions bound to exact semantic identities', async () => {
     onTestFailed(() => saveFailureShot(page, 'web-e2e-chat-long-interactions'))
+    await expect.poll(
+      () => scaffold.ctx.agents.get(SessionId(SESSION_ID)) !== undefined,
+      { timeout: 10_000 },
+    ).toBe(true)
     const source = scaffold.ctx.agents.get(SessionId(SESSION_ID))
     if (source === undefined) throw new Error('seeded long-history agent is not attached')