summaryrefslogtreecommitdiffstats
path: root/apps/files/tests
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-09-29 13:24:33 +0200
committerVincent Petry <pvince81@owncloud.com>2015-09-29 13:24:33 +0200
commitd52361b09b3960d962f59b03a7aa178b45efa5b1 (patch)
treece1433f231906dceda3c881dd5f6acdcca93c838 /apps/files/tests
parent4eb299a308fa7501d3106c2857539bfc51bf5509 (diff)
downloadnextcloud-server-d52361b09b3960d962f59b03a7aa178b45efa5b1.tar.gz
nextcloud-server-d52361b09b3960d962f59b03a7aa178b45efa5b1.zip
Disable sorting when multiselect is enabled in file list
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/js/filelistSpec.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index c05e7c37214..31e5c410270 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -2156,6 +2156,25 @@ describe('OCA.Files.FileList tests', function() {
expect(fileList.files.length).toEqual(5);
expect(fileList.$fileList.find('tr').length).toEqual(5);
});
+ it('does not sort when clicking on header whenever multiselect is enabled', function() {
+ var sortStub = sinon.stub(OCA.Files.FileList.prototype, 'setSort');
+
+ fileList.setFiles(testFiles);
+ fileList.findFileEl('One.txt').find('input:checkbox:first').click();
+
+ fileList.$el.find('.column-size .columntitle').click();
+
+ expect(sortStub.notCalled).toEqual(true);
+
+ // can sort again after deselecting
+ fileList.findFileEl('One.txt').find('input:checkbox:first').click();
+
+ fileList.$el.find('.column-size .columntitle').click();
+
+ expect(sortStub.calledOnce).toEqual(true);
+
+ sortStub.restore();
+ });
});
describe('create file', function() {
var deferredCreate;