Loading
Improve deteriminism of simulateDrag
What does this MR do and why?
This MR addresses an issue identified in this comment where tests using the simulateDrag helper were very flaky.
- Instead of using
setTimeoutlet's userequestAnimationFrame. - Let's also wait a frame between moving and finishing.
Screenshots or screen recordings
How to set up and validate locally
-
Either on
.comor locally, go to an issues board page which has 3 or more issues in the first list. -
Remove the
export functionpart of thesimulate_drag.js. Copy and paste thesimulate_drag.jscontents into a browser console (see demo) -
Run the following in the browser console:
simulateDrag({ scrollable: document.querySelector('body'), duration: 1000, performDrop: true, extraHeight: 0, from: { el: document.querySelectorAll('.board-list')[0], index: 0, }, to: { el: document.querySelectorAll('.board-list')[0], index: 2 } });
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
- I have evaluated the MR acceptance checklist for this MR.
Edited by Paul Slaughter