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 = {
|
var eventData = {
|
||||||
delegatedEvent: {
|
delegatedEvent: {
|
||||||
target: $target
|
target: $target
|
||||||
|
},
|
||||||
|
preventDefault: function () {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
uploader.trigger('drop', eventData, data || {});
|
uploader.trigger('drop', eventData, data || {});
|
||||||
return !!data.targetDir;
|
return !!data.targetDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
it('drop on a tr or crumb outside file list does not trigger upload', function() {
|
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 $anotherTable = $('<table><tbody><tr><td>outside<div class="crumb">crumb</div></td></tr></table>');
|
||||||
var ev;
|
var ev;
|
||||||
$('#testArea').append($anotherTable);
|
$('#testArea').append($anotherTable);
|
||||||
ev = dropOn($anotherTable.find('tr'), uploadData);
|
ev = dropOn($anotherTable.find('tr'), uploadData);
|
||||||
expect(ev).toEqual(false);
|
expect(ev).toEqual(false);
|
||||||
|
|
||||||
ev = dropOn($anotherTable.find('.crumb'), uploadData);
|
ev = dropOn($anotherTable.find('.crumb'), uploadData);
|
||||||
expect(ev).toEqual(false);
|
expect(ev).toEqual(false);
|
||||||
});
|
});
|
||||||
it('drop on an element outside file list container does not trigger upload', function() {
|
it('drop on an element outside file list container does not trigger upload', function() {
|
||||||
var $anotherEl = $('<div>outside</div>');
|
var $anotherEl = $('<div>outside</div>');
|
||||||
var ev;
|
var ev;
|
||||||
|
|
Loading…
Reference in New Issue