summaryrefslogtreecommitdiffstats
path: root/apps/files/tests/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-04-21 11:57:29 +0200
committerVincent Petry <pvince81@owncloud.com>2015-04-21 14:31:13 +0200
commit53a23364ef5184d049674e50447c2a0fbe8be72a (patch)
treede5e4674ba2d7c06dd060c951565b30347da4f13 /apps/files/tests/js
parentb0fcf0fa0ee8846e2ba35ede5968ed0227c5675d (diff)
downloadnextcloud-server-53a23364ef5184d049674e50447c2a0fbe8be72a.tar.gz
nextcloud-server-53a23364ef5184d049674e50447c2a0fbe8be72a.zip
Added empty content message for empty read-only folders
Diffstat (limited to 'apps/files/tests/js')
-rw-r--r--apps/files/tests/js/filelistSpec.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index 153cbe52c10..aa44c92792d 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -87,7 +87,8 @@ describe('OCA.Files.FileList tests', function() {
'<tbody id="fileList"></tbody>' +
'<tfoot></tfoot>' +
'</table>' +
- '<div id="emptycontent">Empty content message</div>' +
+ // TODO: move to handlebars template
+ '<div id="emptycontent"><h2>Empty content message</h2><p class="uploadmessage">Upload message</p></div>' +
'<div class="nofilterresults hidden"></div>' +
'</div>'
);
@@ -845,13 +846,15 @@ describe('OCA.Files.FileList tests', function() {
fileList.setFiles([]);
expect($('#filestable thead th').hasClass('hidden')).toEqual(true);
expect($('#emptycontent').hasClass('hidden')).toEqual(false);
+ expect($('#emptycontent .uploadmessage').hasClass('hidden')).toEqual(false);
expect(fileList.$el.find('.summary').hasClass('hidden')).toEqual(true);
});
- it('hides headers, empty content message, and summary when list is empty and user has no creation permission', function(){
+ it('hides headers, upload message, and summary when list is empty and user has no creation permission', function(){
$('#permissions').val(0);
fileList.setFiles([]);
expect($('#filestable thead th').hasClass('hidden')).toEqual(true);
- expect($('#emptycontent').hasClass('hidden')).toEqual(true);
+ expect($('#emptycontent').hasClass('hidden')).toEqual(false);
+ expect($('#emptycontent .uploadmessage').hasClass('hidden')).toEqual(true);
expect(fileList.$el.find('.summary').hasClass('hidden')).toEqual(true);
});
it('calling findFileEl() can find existing file element', function() {