hootsuite / grid

Drag and drop library for two-dimensional, resizable and responsive lists
http://hootsuite.github.io/grid/
Apache License 2.0
3.57k stars 279 forks source link

Trigger stop event #101

Closed BoyZeePoole closed 7 years ago

BoyZeePoole commented 7 years ago

Hi, I'm writing unit tests and would like to trigger the stop event in my test code.

andrei-picus-hs commented 7 years ago

You mean the drag stop event? Since the event handler is attached using jQuery's on() method, you can use jQuery.trigger to trigger it. You could also write Selenium tests that control an actual browser.

P.S.: these wouldn't be unit tests as you're checking both the jQuery plugin and the underlying lib.