diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-12-17 11:50:24 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-12-18 18:09:46 +0100 |
commit | d27826bac06ca54eeeba73420983a05a1a557cf6 (patch) | |
tree | 90df41b1321fd8bcc2d980926b6828d19179f3e7 /apps/files/tests | |
parent | 95a255b0d4dc4d188022fcd11f0c8c03a76041b7 (diff) | |
download | nextcloud-server-d27826bac06ca54eeeba73420983a05a1a557cf6.tar.gz nextcloud-server-d27826bac06ca54eeeba73420983a05a1a557cf6.zip |
Correctly render uploadtext indicator only on folders
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 3542a5cee8f..9dfcdfead7f 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -2402,6 +2402,21 @@ describe('OCA.Files.FileList tests', function() { 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 () { |