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.
This commit is contained in:
Jinjing
2026-09-19 00:45:40 -07:00
parent 3de7273abb
commit c31c7d3e71
+4 -2
View File
@@ -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] })