I want to test to drag and drop on a full calendar event (change the date of a task) with Cypress, the test passes but the event was not dropped :
This is the test implementation :
Then('I move a task to another date', () => {
cy.get('.fc-event')
.trigger('mousedown', { which: 1, pageX: 188, pageY: 196 })
.trigger('mousemove', { which: 1, pageX: 188, pageY: 261 })
.trigger('mouseup')
})
I test it with this plugin https://www.npmjs.com/package/@4tw/cypress-drag-drop but same results , the event did not move :
Then('I move a task to another date', () => {
cy.get('.fc-event').drag(':nth-child(3) > .fc-bg > table > tbody > tr > .fc-thu', { force: true })
})
EDIT
I suceeded to do it with this implementation :
Then('I move a task to another date', () => {
cy.get('.fc-day-grid-event')
.trigger('mousedown', { which: 1, button: 0 })
.trigger('mousemove', {
pageX: 775,
pageY: 1250,
})
.trigger('mouseup', { force: true })
})
The error was to not use button: 0 and also to not give good coordinates values.

