I am trying to simulate a mouse wheel event on an input type number on a react web application, using the Cypress Testing Framework. I am using trigger as per their docs (https://docs.cypress.io/api/commands/trigger.html) but it seems like there is very little information online as to how to actually create the synthetic event and what arguments it requires. This is what I have so far:
cy.get("#cost-amount-input")
.click()
.trigger("mouseover")
//.trigger("mousewheel", {deltaY: 99})
.trigger("wheel", { deltaY: -66.666666, wheelDelta: 120, wheelDeltaX: 0, wheelDeltaY: 120, bubbles: true})
.blur()
.then(() => {
/* test if the mouse wheel event chagned the value as expected */
});
Adding an event listener to the document for all wheel events shows that my event is firing, but it is not causing the value to change as happens when I do an actual mouse wheel event. Here are the two different events as captured by my event listener. Cypress synthetic event (does not work)
Actual mouse wheel event (does work - changes the value):
Any info is appreciated.

