Closed Humorloos closed 2 years ago
Hi @Humorloos Did you manage to pan the map??
I'm trying with this code... but nothing. I'm usin OpenLayers 6.10.0
cy.fixture('maritimeObjects').then((maritimeObjects) => {
cy.wait(1000)
cy.get(maritimeObjects.mapCanvas)
.trigger('pointerdown', {
x: 50,
y: 370,
pointerType: 'touch',
pointerId: 1,
})
.trigger('pointermove', {
x: 300,
y: 200,
pointerType: 'touch',
pointerId: 1,
})
.trigger('pointerup', {
x: 300,
y: 200,
pointerType: 'touch',
pointerId: 1,
})
})
The fixture mapCanvas is this selector:
"mapCanvas": "div.ol-map-container div.ol-viewport div.ol-unselectable.ol-layers div.ol-layer canvas"
Until now, I haven't been able to trigger the modify interaction from cypress. Closest I could get with https://github.com/cypress-io/cypress/issues/1624 was:
which also does not trigger the modify event though :(