Cannot trigger onHover event with cypress mouseover #24104
Unanswered
convers39
asked this question in
Questions and Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using Cypress to test the mouseover behavior on a map (deck.gl), I have a
TileLayer
rendered on the DOM, and when hovering my mouse on the map, there is a tooltip popup beside the cursor (as below)Now when I try to test this behavior with Cypress, the Cypress mouseover event seems not to work with the
onHover
function inTileLayer
, not sure what is the reason here. I have tried both the official simulated mouseover withcy.get('element').trigger('mouseover')
and the real event, none of them worked.A slight difference between using Cypress trigger and real event is that, the Cypress trigger can only work when select the
div[id="view-default-view"
element, if I try to select the canvas then it will fail as the canvas is covered by the div. With real event I don't have this issue. While both didn't trigger theonHover
function.A strange thing is that when I try to pin on a step, such as a step of getting the canvas element in Cypress, the map is not showing (as below).
If I remove the pin then it shows the map again, and the

onHover
function is triggered normally when I move the cursor in.Does anyone have any clues on this issue?
Beta Was this translation helpful? Give feedback.
All reactions