From 0fb6473a4b61d193f87241a8512a783558af50a3 Mon Sep 17 00:00:00 2001 From: "paseo-bot[bot]" <266920839+paseo-bot[bot]@users.noreply.github.com> Date: Sat, 14 Nov 2026 15:36:40 +0000 Subject: [PATCH] Keep the slash-menu arrow-choice test from erasing its search before it applies (#9677) * test(app): wait for the slash search to change before erasing it "forgets an arrow-key choice once the search changes" waited for /help after typing "h", but /help is already in the unfiltered list, so the wait passed at once. On web the cursor reaches the slash search after paint; a Backspace sent before that frame left the search at "" the whole time, the /exit choice stood, and Enter archived the agent. The test now waits for /tdd to leave the list, which only happens once the search is "h". Co-Authored-By: Claude Opus 5.5 * test(app): wait for the slash search to return before Enter The input's value runs ahead of the slash list on web, so Enter could still land on the list for "h". Wait for /tdd to come back first. Co-Authored-By: Claude Opus 5.5 --------- Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- packages/app/e2e/browser/composer-autocomplete.spec.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/app/e2e/browser/composer-autocomplete.spec.ts b/packages/app/e2e/browser/composer-autocomplete.spec.ts index 088159e7f..bf854c89b 100644 --- a/packages/app/e2e/browser/composer-autocomplete.spec.ts +++ b/packages/app/e2e/browser/composer-autocomplete.spec.ts @@ -787,9 +787,13 @@ test.describe("Composer autocomplete", () => { await input.press("ArrowDown"); await input.press("ArrowDown"); await input.press("h"); - await expect(popover.getByText("/help", { exact: true }).first()).toBeVisible(); + // On web the search reads the cursor after paint, so the input's value runs ahead of + // the list. Wait on the list itself: /tdd is hidden only while the search is "h", and + // back only once the search is "" again. + await expect(popover.getByText("/tdd", { exact: true })).toHaveCount(0); await input.press("Backspace"); await expect(input).toHaveValue("/"); + await expect(popover.getByText("/tdd", { exact: true }).first()).toBeVisible(); await input.press("Enter"); await expect(input).toHaveValue("/tdd ");