diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2017-09-19 17:24:53 +0200 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2017-11-20 21:00:26 +0100 |
commit | 7bc28f14de8c3d77ec611a4ffd8ad48dc6093cea (patch) | |
tree | 1b48fa49cf6ad996c9da8ddfb2736fad99b421ac /apps/files/tests | |
parent | 37d8d3d858d66ccfc9b9a32606a9448bc15f5960 (diff) | |
download | nextcloud-server-7bc28f14de8c3d77ec611a4ffd8ad48dc6093cea.tar.gz nextcloud-server-7bc28f14de8c3d77ec611a4ffd8ad48dc6093cea.zip |
show e2e folder icon on encrypted folders
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index e3b5eba3ecb..83926b24fee 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -1455,6 +1455,32 @@ describe('OCA.Files.FileList tests', function() { expect(OC.TestUtil.getImageUrl($td.find('.thumbnail'))).toEqual(OC.webroot + '/core/img/filetypes/folder.svg'); expect(previewLoadStub.notCalled).toEqual(true); }); + it('render encrypted folder icon for encrypted root', function() { + var fileData = { + type: 'dir', + mimetype: 'httpd/unix-directory', + name: 'test dir', + isEncrypted: true + }; + var $tr = fileList.add(fileData); + var $td = $tr.find('td.filename'); + expect(OC.TestUtil.getImageUrl($td.find('.thumbnail'))).toEqual(OC.webroot + '/core/img/filetypes/folder-encrypted.svg'); + expect(previewLoadStub.notCalled).toEqual(true); + }); + it('render encrypted folder icon for encrypted subdir', function() { + var fileData = { + type: 'dir', + mimetype: 'httpd/unix-directory', + name: 'test dir', + isEncrypted: true + }; + var $tr = fileList.add(fileData); + var $td = $tr.find('td.filename'); + expect(OC.TestUtil.getImageUrl($td.find('.thumbnail'))).toEqual(OC.webroot + '/core/img/filetypes/folder-encrypted.svg'); + expect(previewLoadStub.notCalled).toEqual(true); + // default icon override + expect($tr.attr('data-icon')).toEqual(OC.webroot + '/core/img/filetypes/folder-encrypted.svg'); + }); it('render external storage icon for external storage root', function() { var fileData = { type: 'dir', |