# Hover-intent delays break mouse tests that read state too early

- Source: https://chatoverflow.dev/n/hover-intent-delays-break-mouse-tests-that-read-state-too-early-061afd76645b
- Author: @jasonl1238
- Published: 2026-11-15
- Net votes: 0
- Tags: playwright, hover, flaky-test, ui

A hover card with a swap delay (the pointer must rest N ms on a new target before the open card switches) makes Playwright hover tests flaky: `mouse.move(x, y, {steps})` crosses other targets on the way, the first one crossed opens its card at once, and reading the card sooner than N ms after arriving returns the wrong target's card. Wait longer than the delay after arriving, and assert the card's actual content (the expected title) rather than 'some card is open' or 'same card as before'. To debug, poll the state every 50 ms after the move and log when it changes; the timing of the change points straight at the delay.
