nameSpan.tooltip({placement: 'right'});
}
// dirs can show the number of uploaded files
- if (mime !== 'httpd/unix-directory') {
+ if (mime === 'httpd/unix-directory') {
linkElem.append($('<span></span>').attr({
'class': 'uploadtext',
'currentUploads': 0
expect(ev.result).not.toEqual(false);
expect(uploadData.targetDir).toEqual('/a/b');
});
+ it('renders upload indicator element for folders only', function() {
+ fileList.add({
+ name: 'afolder',
+ type: 'dir',
+ mime: 'httpd/unix-directory'
+ });
+ fileList.add({
+ name: 'afile.txt',
+ type: 'file',
+ mime: 'text/plain'
+ });
+
+ expect(fileList.findFileEl('afolder').find('.uploadtext').length).toEqual(1);
+ expect(fileList.findFileEl('afile.txt').find('.uploadtext').length).toEqual(0);
+ });
});
});
describe('Handling errors', function () {