]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix test
authorRobin Appelman <robin@icewind.nl>
Tue, 11 Jul 2017 12:01:16 +0000 (14:01 +0200)
committerRobin Appelman <robin@icewind.nl>
Wed, 12 Jul 2017 10:20:14 +0000 (12:20 +0200)
Signed-off-by: Robin Appelman <robin@icewind.nl>
apps/files/tests/js/filelistSpec.js

index b7ee9c8554e8a6639b606d981d8f988b426ee195..ffb043610413aee40402cf791ad43b54d87c633f 100644 (file)
@@ -2694,22 +2694,24 @@ describe('OCA.Files.FileList tests', function() {
                                var eventData = {
                                        delegatedEvent: {
                                                target: $target
+                                       },
+                                       preventDefault: function () {
                                        }
                                };
                                uploader.trigger('drop', eventData, data || {});
                                return !!data.targetDir;
                        }
 
-                       it('drop on a tr or crumb outside file list does not trigger upload', function() {
-                               var $anotherTable = $('<table><tbody><tr><td>outside<div class="crumb">crumb</div></td></tr></table>');
-                               var ev;
-                               $('#testArea').append($anotherTable);
-                               ev = dropOn($anotherTable.find('tr'), uploadData);
-                               expect(ev).toEqual(false);
+                               it('drop on a tr or crumb outside file list does not trigger upload', function() {
+                                       var $anotherTable = $('<table><tbody><tr><td>outside<div class="crumb">crumb</div></td></tr></table>');
+                                       var ev;
+                                       $('#testArea').append($anotherTable);
+                                       ev = dropOn($anotherTable.find('tr'), uploadData);
+                                       expect(ev).toEqual(false);
 
-                               ev = dropOn($anotherTable.find('.crumb'), uploadData);
-                               expect(ev).toEqual(false);
-                       });
+                                       ev = dropOn($anotherTable.find('.crumb'), uploadData);
+                                       expect(ev).toEqual(false);
+                               });
                        it('drop on an element outside file list container does not trigger upload', function() {
                                var $anotherEl = $('<div>outside</div>');
                                var ev;