diff --git a/tests/e2e/quick-open-file-paths.spec.ts b/tests/e2e/quick-open-file-paths.spec.ts index 68933086815..14f31db8d60 100644 --- a/tests/e2e/quick-open-file-paths.spec.ts +++ b/tests/e2e/quick-open-file-paths.spec.ts @@ -49,8 +49,14 @@ test('cmd+p quick open prioritizes the filename and reveals the full path on hov // tooltip left open from a prior attempt can swallow the next hover. await expect(async () => { 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 }) + const currentRow = dialog.getByRole('option').filter({ hasText: 'QuickOpenTarget.tsx' }).first() + await expect(currentRow).toBeVisible() + const currentBox = await currentRow.boundingBox() + if (!currentBox) { + throw new Error('Quick Open result remounted before hover') + } + await orcaPage.mouse.move(currentBox.x + 20, currentBox.y + 12) + await orcaPage.mouse.move(currentBox.x + 40, currentBox.y + 12) await expect(tooltip).toBeVisible({ timeout: 2_000 }) }).toPass({ timeout: 15_000, intervals: [100, 250, 500] })