Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2017-07-11 14:01:16 +02:00
parent d05f67b2f3
commit 9e675dd8b1
No known key found for this signature in database
GPG Key ID: CBCA68FBAEBF98C9
1 changed files with 11 additions and 9 deletions

View 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;