Unable to Trigger Mapbox GL JS "drag" Event GL in Cypress #19963
Unanswered
brianbancroft
asked this question in
Questions and Help
Replies: 1 comment
-
Did you ever get an answer for this? I've been running into the same issue. |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
I am not able to trigger a map dragging action through the Cypress API over a Mapbox GL Map. Cypress is a fantastic e2e suite, and I appreciate all the help it gives me with the non-map things. Its feedback and video playbacks are wonderful.
Before writing here, I've asked SO, as well as looked at some other examples in cypress and outside:
Test Video and Code
e2e-outcome.mov
The cursor point appears at the correct location, but no actions were detected by the mapboxgl map.
Live site
I've created a test site here: https://cypress-mapboxgl-click-event.netlify.app/
The test site has a map that detects both "drag" and "mousemove" events over the canvas and sets the text into a span with a unique ID to "yes".
map-site-demo.mov
Repo
The repo for this site is here: https://github.com/brianbancroft/question-cypress-mapboxgl
to run the repo, just clone, install, and
npx cypress open
. It tests against the live site.Beta Was this translation helpful? Give feedback.
All reactions