mirror of
https://github.com/nextcloud/server.git
synced 2026-03-26 12:25:16 -04:00
fix test
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
12c9b1efb0
commit
e1d6ca3c53
1 changed files with 11 additions and 9 deletions
|
|
@ -2808,22 +2808,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 a new issue