Refactor test_utils bundle
What does this MR do?
Fixes a bug blocking gitlab-ee!1540 in which scrollTop
is wrongly assumed to be a component of Element.getBoundingClientRect()
and was being corrected for in the values sent to the mousemove
event's clientX
attribute. Here's a useful stack overflow answer related to the topic of clientX and clientY. This was causing tests to fail once the Sortable
elements being targeted by simulateDrag
were moved far enough down the page.
It also refactors simulate_drag.js
to remove eslint violations and merges it to the main.js bundle in a block which will be omitted when compiled for production.
Are there points in the code the reviewer needs to double check?
The tests which relied on simulate_drag ought to still pass. This should be proof enough that the script is still functioning as intended.
Why was this MR needed?
Blocking gitlab-ee!1540
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
[ ] Changelog entry added, if necessary[ ] Documentation created/updated[ ] API support added- Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together