mirror of
https://gitee.com/zhangsken/opencode.git
synced 2026-10-16 10:30:01 +08:00
test(tui): wait for workspace filter focus (#50709)
Co-authored-by: simonklee <simonklee@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
94df7a812d
commit
ad756ef09b
@@ -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 })
|
||||
|
||||
Reference in New Issue
Block a user