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.
This commit is contained in:
+5
-6
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user