From 9e675dd8b178586a69cc2b063ddf0ce928417ba3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Tue, 11 Jul 2017 14:01:16 +0200 Subject: [PATCH] fix test Signed-off-by: Robin Appelman --- apps/files/tests/js/filelistSpec.js | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index b7ee9c8554e..ffb04361041 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -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 = $('
outside
crumb
'); - 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 = $('
outside
crumb
'); + 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 = $('
outside
'); var ev; -- 2.39.5