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();