I'm trying to simulate ctrl + mouse drag on an OpenLayers map with Cypress.
The only way I've managed to get OpenLayers to register click/Cypress events (for example, clicking to create a feature) is with .click()
e.g.
cy.get('#map').click(845, 710);
If I use .trigger() and pointerdown/mousedown/dragstart it either fails silently or throws an error. Either way, it doesn't work.
Because .click() also emits pointerdown/pointerup events I can't seem to use this to simulate a ctrl + mouse drag.
Additionally, to press ctrl, I use the following: cy.get('body').type('{ctrl}', {release: false}) - this works.
I'm at a loss for what to try next. Is there a property of .click() I'm missing? or is this a potential bug/issue with either OpenLayers or Cypress?
Edit: I'm using Cypress 4.8.0 and OpenLayers 6.3.1