Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-44326

Add drag and drop support for Moodle elements that use the drag handle "moodle-core-dragdrop-draghandle"

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              urshunkler Urs Hunkler
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated: