From 8edccf05030fcfe4c9bdac523a937bc6ecac5720 Mon Sep 17 00:00:00 2001 From: "paseo-bot[bot]" <266920839+paseo-bot[bot]@users.noreply.github.com> Date: Wed, 18 Nov 2026 18:51:59 +0000 Subject: [PATCH] test(app): press a fork trigger again when a streamed line moves it (#10156) "forks a streaming assistant turn without interrupting it" pressed the in-flight turn's fork trigger once and waited for the menu. While the chat is shorter than the viewport, each streamed line moves the trigger down. A line that arrives between the press and the release moves the trigger out from under the pointer, the press opens nothing, and the wait for "Fork in a new tab" timed out. openForkMenu now presses the trigger until its menu shows. Co-authored-by: paseo-bot[bot] <266920839+paseo-bot[bot]@users.noreply.github.com> --- .../app/e2e/support/helpers/assistant-fork.ts | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/packages/app/e2e/support/helpers/assistant-fork.ts b/packages/app/e2e/support/helpers/assistant-fork.ts index 7ee4cdc4f..e0304d96a 100644 --- a/packages/app/e2e/support/helpers/assistant-fork.ts +++ b/packages/app/e2e/support/helpers/assistant-fork.ts @@ -56,11 +56,20 @@ function inFlightTurn(page: Page) { return page.getByTestId("turn-working-indicator"); } +/** + * Presses a fork trigger until its menu shows. + * + * The in-flight turn's trigger sits below text that is still streaming in. While the chat is + * shorter than the viewport, each new line moves the trigger down. A line that arrives between + * the press and the release moves the trigger away from the pointer, so the press opens nothing, + * and the next press lands on the trigger where it is now. + */ async function openForkMenu(page: Page, trigger: ReturnType): Promise { - await trigger.click(); - await expect(page.getByRole("menuitem", { name: "Fork in a new tab" })).toBeVisible({ - timeout: 10_000, - }); + const forkInNewTab = page.getByRole("menuitem", { name: "Fork in a new tab" }); + await expect(async () => { + await trigger.click({ timeout: 5_000 }); + await expect(forkInNewTab).toBeVisible({ timeout: 5_000 }); + }).toPass({ timeout: 30_000 }); } export async function openMostRecentAssistantForkMenu(page: Page): Promise {