diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-23 11:27:02 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-06-24 13:55:14 +0200 |
commit | b4cf29775849236be338fc7c8e2ad0d7f361ade7 (patch) | |
tree | 58a6f5ab91ac34c182d261dd1bdbc6423bd01b10 /apps/files/tests | |
parent | 04e3da0cf51f23b501eaef34e4be771b15c6e6d2 (diff) | |
download | nextcloud-server-b4cf29775849236be338fc7c8e2ad0d7f361ade7.tar.gz nextcloud-server-b4cf29775849236be338fc7c8e2ad0d7f361ade7.zip |
Prerender file list pages to include search results
When filtering the file list, if a result is on an unrendered page,
make sure to call _nextPage() to prerender the pages in order to
display all matching results.
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index 7e6408128bb..a74e1c7328c 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -989,6 +989,17 @@ describe('OCA.Files.FileList tests', function() { expect($summary.find('.info').text()).toEqual("1 folder and 3 files"); expect($nofilterresults.hasClass('hidden')).toEqual(true); }); + it('filters the list of non-rendered rows using filter()', function() { + var $summary = $('#filestable .summary'); + var $nofilterresults = fileList.$el.find(".nofilterresults"); + fileList.setFiles(generateFiles(0, 64)); + + fileList.setFilter('63'); + expect($('#fileList tr:not(.hidden)').length).toEqual(1); + expect($summary.hasClass('hidden')).toEqual(false); + expect($summary.find('.info').text()).toEqual("0 folders and 1 file matches '63'"); + expect($nofilterresults.hasClass('hidden')).toEqual(true); + }); it('hides the emptyfiles notice when using filter()', function() { expect(fileList.files.length).toEqual(0); expect(fileList.files).toEqual([]); |