cypress e2e testing. Openlayers pan

111 views Asked by At

I am trying, unsuccessfully, to pan the map triggering events like pointerdown, pointermove and pointerup using cypress.

This is the code I am using:

cy.get('.ol-viewport')
  .trigger('pointerdown', {
    clientX: 465,
    clientY: 412,
    force: true,
    eventConstructor: 'MouseEvent',        
    pointerId: 1        
  })
  .trigger('pointermove', {
    clientX: 325,
    clientY: 466,
    eventConstructor: 'MouseEvent',
    force: true,   
  })
cy.wait(1000)  

cy.get('.ol-viewport')
  .trigger('pointerup', {force: true}) 

Events are triggered. I know that because there is a DIV showing the mouse coordinates over the map. After triggering pointermouse event, the mouse coords are updated.

The problem is that pan never occurs. Any thoughts?

I tried triggerging events with different params (poinerid, isPrimary, force) with no luck

0

There are 0 answers