summaryrefslogtreecommitdiffstats
path: root/apps/files/tests
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-06-27 18:23:00 +0200
committerLukas Reschke <lukas@owncloud.com>2016-06-27 18:23:00 +0200
commit6670d3765881a1a7579bd96a523a90c2a52aec4a (patch)
tree4251976f5699d7b9e0b1b0aa42b3a5baca5432b5 /apps/files/tests
parentcee2f5dc65f743e0e6470e852978d8bb8e346012 (diff)
parentf8fa031e9f81ba052930d2de647d997af3c309c6 (diff)
downloadnextcloud-server-6670d3765881a1a7579bd96a523a90c2a52aec4a.tar.gz
nextcloud-server-6670d3765881a1a7579bd96a523a90c2a52aec4a.zip
Merge remote-tracking branch 'upstream/master' into master-sync-upstream
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/js/filelistSpec.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index 44f271d8084..ae4b75f7771 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([]);