Open Yelinz opened 1 year ago
Describe the bug drag test helper can produce a division by 0, which causes an error for triggerEvent because the value is Infinity
triggerEvent
Infinity
To Reproduce Reproduction unsure, but only seems to happen in headless test mode.
Expected behavior Avoid the division by 0
Additional context The offending line
const scale = clientHeight / (rect.bottom - rect.top);
https://github.com/adopted-ember-addons/ember-sortable/blob/master/addon/src/test-support/helpers/drag.js#L61
Describe the bug drag test helper can produce a division by 0, which causes an error for
triggerEvent
because the value isInfinity
To Reproduce Reproduction unsure, but only seems to happen in headless test mode.
Expected behavior Avoid the division by 0
Additional context The offending line
https://github.com/adopted-ember-addons/ember-sortable/blob/master/addon/src/test-support/helpers/drag.js#L61