diff options
Diffstat (limited to 'apps/files/tests/js/filelistSpec.js')
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 08da15b8a88..1b26a468172 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -94,7 +94,7 @@ describe('OCA.Files.FileList tests', function() { '<input type="checkbox" id="select_all_files" class="select-all checkbox">' + '<a class="name columntitle" data-sort="name"><span>Name</span><span class="sort-indicator"></span></a>' + '<span id="selectedActionsList" class="selectedActions hidden">' + - '<a href class="copy-move">Move or copy</a>' + + '<a href class="copy-move"><span class="label">Move or copy</span></a>' + '<a href class="download"><img src="actions/download.svg">Download</a>' + '<a href class="delete-selected">Delete</a></span>' + '</th>' + @@ -2101,10 +2101,17 @@ describe('OCA.Files.FileList tests', function() { $('#permissions').val(OC.PERMISSION_READ | OC.PERMISSION_UPDATE); $('.select-all').click(); expect(fileList.$el.find('.selectedActions .copy-move').hasClass('hidden')).toEqual(false); + expect(fileList.$el.find('.selectedActions .copy-move .label').text()).toEqual('Move or copy'); testFiles[0].permissions = OC.PERMISSION_READ; $('.select-all').click(); fileList.setFiles(testFiles); $('.select-all').click(); + expect(fileList.$el.find('.selectedActions .copy-move').hasClass('hidden')).toEqual(false); + expect(fileList.$el.find('.selectedActions .copy-move .label').text()).toEqual('Copy'); + testFiles[0].permissions = OC.PERMISSION_NONE; + $('.select-all').click(); + fileList.setFiles(testFiles); + $('.select-all').click(); expect(fileList.$el.find('.selectedActions .copy-move').hasClass('hidden')).toEqual(true); }); it('show doesnt show the download action if one or more files are not downloadable', function () { |