From ad756ef09bbe5af0dc5ce71e0c1cc37faccc496d Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" <219766164+opencode-agent[bot]@users.noreply.github.com> Date: Tue, 22 Sep 2026 18:43:53 +0000 Subject: [PATCH] test(tui): wait for workspace filter focus (#50709) Co-authored-by: simonklee --- packages/tui/test/cli/tui/prompt-move.test.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/tui/test/cli/tui/prompt-move.test.tsx b/packages/tui/test/cli/tui/prompt-move.test.tsx index f512b6884bb..1b1dead8b11 100644 --- a/packages/tui/test/cli/tui/prompt-move.test.tsx +++ b/packages/tui/test/cli/tui/prompt-move.test.tsx @@ -92,6 +92,7 @@ test.each([false, true])("selecting a workspace opens Home without moving a sess try { await fixture.move.open() await fixture.app.waitForFrame((frame) => frame.includes("Worktrees") && frame.includes(linked)) + await fixture.app.waitFor(() => fixture.app.renderer.currentFocusedEditor instanceof InputRenderable) await fixture.app.mockInput.typeText("linked") await fixture.app.waitForFrame((frame) => frame.includes(linked) && !frame.includes(clone)) fixture.app.mockInput.pressEnter() @@ -113,6 +114,7 @@ test("removal sends project ownership and the destination without a configuratio try { await fixture.move.open() await fixture.app.waitForFrame((frame) => frame.includes("Worktrees") && frame.includes(linked)) + await fixture.app.waitFor(() => fixture.app.renderer.currentFocusedEditor instanceof InputRenderable) await fixture.app.mockInput.typeText("linked") await fixture.app.waitForFrame((frame) => frame.includes(linked) && !frame.includes(clone)) fixture.app.mockInput.pressKey("d", { ctrl: true }) @@ -153,6 +155,7 @@ test.each([false, true])("Ctrl+M moves only an existing session (home=%s)", asyn const frame = await fixture.app.waitForFrame((frame) => frame.includes("Worktrees") && frame.includes(linked)) expect(frame).toContain("new ctrl+a") expect(frame.includes("move ctrl+m")).toBe(!home) + await fixture.app.waitFor(() => fixture.app.renderer.currentFocusedEditor instanceof InputRenderable) await fixture.app.mockInput.typeText("linked") await fixture.app.waitForFrame((frame) => frame.includes(linked) && !frame.includes(clone)) fixture.app.mockInput.pressKey("m", { ctrl: true })