fix test
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
d05f67b2f3
commit
9e675dd8b1
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue