Просмотр исходного кода

test(web): wait for seeded agent attachment

Dudu-0223 1 месяц назад
Родитель
Сommit
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')