From e8ec9b8380a0d4b61aa95f68609dcfc28f342c7f Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 2 Sep 2025 19:40:52 -0700 Subject: [PATCH] fix: increase timeout on tests --- .../src/ui/__tests__/TUIChat.fileSearch.test.tsx | 12 ++++++------ .../ui/__tests__/TUIChat.slashCommands.test.tsx | 14 +++++++------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/extensions/cli/src/ui/__tests__/TUIChat.fileSearch.test.tsx b/extensions/cli/src/ui/__tests__/TUIChat.fileSearch.test.tsx index 6dd14d1eb..de88fcc2b 100644 --- a/extensions/cli/src/ui/__tests__/TUIChat.fileSearch.test.tsx +++ b/extensions/cli/src/ui/__tests__/TUIChat.fileSearch.test.tsx @@ -1,17 +1,17 @@ -import { testSingleMode, renderInMode } from "./TUIChat.dualModeHelper.js"; +import { renderInMode, testSingleMode } from "./TUIChat.dualModeHelper.js"; describe("TUIChat - @ File Search Tests", () => { testSingleMode("shows @ character when user types @", "local", async () => { const { lastFrame, stdin } = renderInMode("local"); // Wait a bit for initial render - await new Promise((resolve) => setTimeout(resolve, 50)); + await new Promise((resolve) => setTimeout(resolve, 100)); // Type the @ character to trigger file search stdin.write("@"); // Wait longer for file search to initialize and display files - await new Promise((resolve) => setTimeout(resolve, 200)); + await new Promise((resolve) => setTimeout(resolve, 400)); const frame = lastFrame()!; @@ -34,7 +34,7 @@ describe("TUIChat - @ File Search Tests", () => { stdin.write("@READ"); // Wait for file search to filter and display results - await new Promise((resolve) => setTimeout(resolve, 100)); + await new Promise((resolve) => setTimeout(resolve, 300)); const frame = lastFrame()!; @@ -58,7 +58,7 @@ describe("TUIChat - @ File Search Tests", () => { stdin.write("@@test"); // Wait for UI update - await new Promise((resolve) => setTimeout(resolve, 100)); + await new Promise((resolve) => setTimeout(resolve, 300)); const frame = lastFrame(); @@ -80,7 +80,7 @@ describe("TUIChat - @ File Search Tests", () => { stdin.write("@"); // Wait for potential async operations - await new Promise((resolve) => setTimeout(resolve, 50)); + await new Promise((resolve) => setTimeout(resolve, 200)); const frame = lastFrame()!; diff --git a/extensions/cli/src/ui/__tests__/TUIChat.slashCommands.test.tsx b/extensions/cli/src/ui/__tests__/TUIChat.slashCommands.test.tsx index 6b46546fb..5a2389116 100644 --- a/extensions/cli/src/ui/__tests__/TUIChat.slashCommands.test.tsx +++ b/extensions/cli/src/ui/__tests__/TUIChat.slashCommands.test.tsx @@ -8,7 +8,7 @@ describe("TUIChat - Slash Commands Tests", () => { stdin.write("/"); // Wait a bit for the UI to update - await new Promise((resolve) => setTimeout(resolve, 50)); + await new Promise((resolve) => setTimeout(resolve, 200)); const frame = lastFrame(); @@ -27,11 +27,11 @@ describe("TUIChat - Slash Commands Tests", () => { testBothModes("filters slash commands when typing /log", async (mode) => { const { lastFrame, stdin } = renderInMode(mode); - // Type /log to trigger slash command filtering + // Type /exi to trigger slash command filtering stdin.write("/exi"); // Wait a bit for the UI to update (allow extra time in both modes) - await new Promise((resolve) => setTimeout(resolve, 200)); + await new Promise((resolve) => setTimeout(resolve, 400)); const frame = lastFrame(); @@ -50,14 +50,14 @@ describe("TUIChat - Slash Commands Tests", () => { testBothModes("handles tab key after slash command", async (mode) => { const { lastFrame, stdin } = renderInMode(mode); - // Type /log and then tab + // Type /exi and then tab stdin.write("/exi"); - await new Promise((resolve) => setTimeout(resolve, 50)); + await new Promise((resolve) => setTimeout(resolve, 200)); stdin.write("\t"); - await new Promise((resolve) => setTimeout(resolve, 50)); + await new Promise((resolve) => setTimeout(resolve, 200)); const frameAfterTab = lastFrame(); @@ -81,7 +81,7 @@ describe("TUIChat - Slash Commands Tests", () => { // Type just / stdin.write("/"); - await new Promise((resolve) => setTimeout(resolve, 200)); + await new Promise((resolve) => setTimeout(resolve, 400)); const frame = lastFrame();