-
New Feature
-
Resolution: Won't Do
-
Minor
-
None
-
2.6.1
-
MOODLE_26_STABLE
-
MDL-44326_master -
To be able to test the block drag and drop functionality on the Moodle /my page I wrote a Behat test and noticed that the drag and drop feature does not work with blocks (in no browser on the Mac).
To be able to test the block drag and drop I have extended the MoodleSelenium2Driver class with a new method "dragToWithHandle" and have written a new behat class "behat_drag_handle" with the method "i_drag_with_handle_and_i_drop_it_in".
This drag and drop feature uses the same parameters as the "i_drag_and_i_drop_it_in" method. The changes are:
- Use the Syn.drag function for the drag and drop process.
- Use the ".moodle-core-dragdrop-draghandle" as the reference element to start the drag to be sure that an active drag element is grabbed by the drag operation.
With these changes block drag and drop Behat tests work with blocks. I am quite sure that other Moodle elements that offer the drag handle will also work.