Mouse event tests don't work (layerX/Y not found) #19342
Unanswered
lucapu88
asked this question in
Component Testing
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone I've been going crazy for several days with this problem but I can't find a solution, I hope there is already someone who has been in the same situation ...
As per documentation: https://docs.cypress.io/api/commands/trigger#Mouse-Events
I'm trying to test my app that draws a square on a d3.js graph, the problem is that the code I write does nothing, and in console it gives me this error:
Error: <rect> attribute x: Expected length," NaN ".
Now I don't know if the reason why nothing happens comes from this error or not. I tried to investigate and my code takes the coordinates of x and y from
event.layerX
andevent.layerY
, I thought they were deprecated but no, I don't understand why in my code the browser reads the layerX and layerY events perfectly while cypress doesn't ...I specify that I use Electron 91 for my tests, and it is the only one I can use, don't ask me why.
Below I put the attempts I made, they both get the same result:
Beta Was this translation helpful? Give feedback.
All reactions