From 7a08b51eec32ce06f1fd788feff94dc4dc10feb3 Mon Sep 17 00:00:00 2001 From: shad Date: Sun, 14 Jun 2026 17:58:01 +0400 Subject: [PATCH] test(qa): widen chat-seed waits so fresh CEO sessions hydrate threads When the QA runs against a fresh CEO session (no pre-existing chat threads), the new-thread create + inbox-edge + message send chain is 4-8 EA2 round-trips. Prior waits (8s thread + 2.5s send + 12s condition) were occasionally too tight. Bumped to 15s + 4s + 20s. 36/36 dogfood stable across the slow-path. --- qa/full_dogfood.mjs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/qa/full_dogfood.mjs b/qa/full_dogfood.mjs index a98b61d..bbeb956 100644 --- a/qa/full_dogfood.mjs +++ b/qa/full_dogfood.mjs @@ -264,25 +264,24 @@ record("llm_unconfigured_falls_back_gracefully", unmatchedReply.length > 0 && !/ // other personas have written since last open. await p.locator(".tab", { hasText: /^\s*Chat\s*$/ }).click(); await p.waitForTimeout(2500); -// First, ensure at least one thread exists by opening one with the HR persona -// if the sidebar happens to be empty. This makes the assertion non-vacuous. const initialThreadCount = await p.locator(".chat-thread-row").count(); if (initialThreadCount === 0) { const sel = p.locator(".chat-new-row select").first(); if (await sel.count()) { await sel.selectOption("hr-head@flow-master.ai").catch(() => {}); await p.locator(".chat-new-row button", { hasText: /Open/ }).click().catch(() => {}); - await p.waitForSelector(".chat-thread-row", { timeout: 8000 }).catch(() => {}); + await p.waitForSelector(".chat-thread-row", { timeout: 15000 }).catch(() => {}); + await p.waitForTimeout(1500); } const ta = p.locator(".chat-composer textarea").first(); if (await ta.count()) { await ta.fill(`qa seed message ${Date.now()}`); await p.locator(".chat-composer button", { hasText: /Send/i }).click().catch(() => {}); - await p.waitForTimeout(2500); + await p.waitForTimeout(4000); } } -await p.waitForFunction(() => document.querySelectorAll(".chat-thread-row").length >= 1, undefined, { timeout: 12000 }).catch(() => {}); -await p.waitForTimeout(1500); +await p.waitForFunction(() => document.querySelectorAll(".chat-thread-row").length >= 1, undefined, { timeout: 20000 }).catch(() => {}); +await p.waitForTimeout(2500); const threadRowCount = await p.locator(".chat-thread-row").count(); const previewRows = await p.locator(".chat-thread-meta").count(); const timeBadges = await p.locator(".chat-thread-time").count();