mirror of
https://github.com/stablyai/orca.git
synced 2026-09-22 00:02:31 +00:00
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:
@@ -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] })
|
||||
|
||||
|
||||
Reference in New Issue
Block a user