From c31c7d3e71234b3ff697ca62c49ff0e2c0960b31 Mon Sep 17 00:00:00 2001 From: Jinjing <6427696+AmethystLiang@users.noreply.github.com> Date: Sat, 19 Sep 2026 00:45:40 -0700 Subject: [PATCH] fix(e2e): fetch current row in quick-open hover retry loop Streaming results can remount the quick-open row under a stationary pointer, making the cached row reference stale. Fetch the current row within the toPass retry loop to ensure hover targets the visible element. --- tests/e2e/quick-open-file-paths.spec.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/e2e/quick-open-file-paths.spec.ts b/tests/e2e/quick-open-file-paths.spec.ts index 68933086815..152998aaad1 100644 --- a/tests/e2e/quick-open-file-paths.spec.ts +++ b/tests/e2e/quick-open-file-paths.spec.ts @@ -48,9 +48,11 @@ test('cmd+p quick open prioritizes the filename and reveals the full path on hov // Streaming results can remount the row under a stationary pointer, and a // tooltip left open from a prior attempt can swallow the next hover. await expect(async () => { + const currentRow = dialog.getByRole('option').filter({ hasText: 'QuickOpenTarget.tsx' }).first() + await expect(currentRow).toBeVisible() await orcaPage.mouse.move(8, 8) - await row.hover({ position: { x: 20, y: 12 }, timeout: 2_000 }) - await row.hover({ position: { x: 40, y: 12 }, timeout: 2_000 }) + await currentRow.hover({ position: { x: 20, y: 12 }, timeout: 2_000 }) + await currentRow.hover({ position: { x: 40, y: 12 }, timeout: 2_000 }) await expect(tooltip).toBeVisible({ timeout: 2_000 }) }).toPass({ timeout: 15_000, intervals: [100, 250, 500] })