fix(app): only navigate prompt history when input is empty (#18775)

This commit is contained in:
Brendan Allan
2026-03-23 19:48:34 +08:00
committed by GitHub
parent 6926dc26d1
commit 36dfe1646b
3 changed files with 11 additions and 5 deletions

View File

@@ -108,7 +108,10 @@ test("prompt history restores unsent draft with arrow navigation", async ({ page
await page.keyboard.type(draft)
await wait(page, draft)
await edge(page, "start")
// Clear the draft before navigating history (ArrowUp only works when prompt is empty)
await prompt.fill("")
await wait(page, "")
await page.keyboard.press("ArrowUp")
await wait(page, second)
@@ -119,7 +122,7 @@ test("prompt history restores unsent draft with arrow navigation", async ({ page
await wait(page, second)
await page.keyboard.press("ArrowDown")
await wait(page, draft)
await wait(page, "")
})
})