diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-01-19 10:51:57 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-01-19 10:51:57 +0100 |
commit | 6e096936e55d928030566dbe6cfa225213aa1977 (patch) | |
tree | a460f22315762efdd4b5a29cc8589c0e127c73ef /apps/files/tests | |
parent | 930555bd5e349cddee9905d83d5435ae3b7a1ea4 (diff) | |
download | nextcloud-server-6e096936e55d928030566dbe6cfa225213aa1977.tar.gz nextcloud-server-6e096936e55d928030566dbe6cfa225213aa1977.zip |
update JS humanFileSize to use KB instead of kB
Diffstat (limited to 'apps/files/tests')
-rw-r--r-- | apps/files/tests/js/fileUploadSpec.js | 4 | ||||
-rw-r--r-- | apps/files/tests/js/filelistSpec.js | 14 | ||||
-rw-r--r-- | apps/files/tests/js/filesummarySpec.js | 12 |
3 files changed, 15 insertions, 15 deletions
diff --git a/apps/files/tests/js/fileUploadSpec.js b/apps/files/tests/js/fileUploadSpec.js index 8a0d6b01952..0483d4649d4 100644 --- a/apps/files/tests/js/fileUploadSpec.js +++ b/apps/files/tests/js/fileUploadSpec.js @@ -102,7 +102,7 @@ describe('OC.Upload tests', function() { expect(failStub.calledOnce).toEqual(true); expect(failStub.getCall(0).args[1].textStatus).toEqual('sizeexceedlimit'); expect(failStub.getCall(0).args[1].errorThrown).toEqual( - 'Total file size 5 kB exceeds upload limit 1000 B' + 'Total file size 5 KB exceeds upload limit 1000 B' ); }); it('does not add file if it exceeds free space', function() { @@ -115,7 +115,7 @@ describe('OC.Upload tests', function() { expect(failStub.calledOnce).toEqual(true); expect(failStub.getCall(0).args[1].textStatus).toEqual('notenoughspace'); expect(failStub.getCall(0).args[1].errorThrown).toEqual( - 'Not enough free space, you are uploading 5 kB but only 1000 B is left' + 'Not enough free space, you are uploading 5 KB but only 1000 B is left' ); }); }); diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js index e6046f2197e..9cd6bc90e88 100644 --- a/apps/files/tests/js/filelistSpec.js +++ b/apps/files/tests/js/filelistSpec.js @@ -213,7 +213,7 @@ describe('OCA.Files.FileList tests', function() { .toEqual(OC.webroot + '/remote.php/webdav/subdir/testName.txt'); expect($tr.find('.nametext').text().trim()).toEqual('testName.txt'); - expect($tr.find('.filesize').text()).toEqual('1 kB'); + expect($tr.find('.filesize').text()).toEqual('1 KB'); expect($tr.find('.date').text()).not.toEqual('?'); expect(fileList.findFileEl('testName.txt')[0]).toEqual($tr[0]); }); @@ -239,7 +239,7 @@ describe('OCA.Files.FileList tests', function() { expect($tr.attr('data-mime')).toEqual('httpd/unix-directory'); expect($tr.attr('data-mtime')).toEqual('123456'); - expect($tr.find('.filesize').text()).toEqual('1 kB'); + expect($tr.find('.filesize').text()).toEqual('1 KB'); expect($tr.find('.date').text()).not.toEqual('?'); expect(fileList.findFileEl('testFolder')[0]).toEqual($tr[0]); @@ -296,7 +296,7 @@ describe('OCA.Files.FileList tests', function() { size: '0' }; var $tr = fileList.add(fileData); - expect($tr.find('.filesize').text()).toEqual('0 kB'); + expect($tr.find('.filesize').text()).toEqual('0 KB'); }); it('generates file element with unknown date when mtime invalid', function() { var fileData = { @@ -424,7 +424,7 @@ describe('OCA.Files.FileList tests', function() { expect($summary.find('.info').text()).toEqual('1 folder and 2 files'); expect($summary.find('.dirinfo').hasClass('hidden')).toEqual(false); expect($summary.find('.fileinfo').hasClass('hidden')).toEqual(false); - expect($summary.find('.filesize').text()).toEqual('69 kB'); + expect($summary.find('.filesize').text()).toEqual('69 KB'); expect(fileList.isEmpty).toEqual(false); }); it('Shows empty content when removing last file', function() { @@ -479,7 +479,7 @@ describe('OCA.Files.FileList tests', function() { expect($summary.find('.info').text()).toEqual('1 folder and 1 file'); expect($summary.find('.dirinfo').hasClass('hidden')).toEqual(false); expect($summary.find('.fileinfo').hasClass('hidden')).toEqual(false); - expect($summary.find('.filesize').text()).toEqual('57 kB'); + expect($summary.find('.filesize').text()).toEqual('57 KB'); expect(fileList.isEmpty).toEqual(false); expect($('#filestable thead th').hasClass('hidden')).toEqual(false); expect($('#emptycontent').hasClass('hidden')).toEqual(true); @@ -777,7 +777,7 @@ describe('OCA.Files.FileList tests', function() { // folder size has increased expect(fileList.findFileEl('somedir').data('size')).toEqual(12311); - expect(fileList.findFileEl('somedir').find('.filesize').text()).toEqual('12 kB'); + expect(fileList.findFileEl('somedir').find('.filesize').text()).toEqual('12 KB'); expect(notificationStub.notCalled).toEqual(true); }); @@ -843,7 +843,7 @@ describe('OCA.Files.FileList tests', function() { $summary = $('#filestable .summary'); expect($summary.hasClass('hidden')).toEqual(false); expect($summary.find('.info').text()).toEqual('1 folder and 3 files'); - expect($summary.find('.filesize').text()).toEqual('69 kB'); + expect($summary.find('.filesize').text()).toEqual('69 KB'); }); it('shows headers, summary and hide empty content message after setting files', function(){ fileList.setFiles(testFiles); diff --git a/apps/files/tests/js/filesummarySpec.js b/apps/files/tests/js/filesummarySpec.js index ae5ff95fc0c..ec94c28acb6 100644 --- a/apps/files/tests/js/filesummarySpec.js +++ b/apps/files/tests/js/filesummarySpec.js @@ -40,7 +40,7 @@ describe('OCA.Files.FileSummary tests', function() { }); expect($container.hasClass('hidden')).toEqual(false); expect($container.find('.info').text()).toEqual('5 folders and 2 files'); - expect($container.find('.filesize').text()).toEqual('250 kB'); + expect($container.find('.filesize').text()).toEqual('250 KB'); }); it('hides summary when no files or folders', function() { var s = new FileSummary($container); @@ -63,7 +63,7 @@ describe('OCA.Files.FileSummary tests', function() { s.update(); expect($container.hasClass('hidden')).toEqual(false); expect($container.find('.info').text()).toEqual('6 folders and 3 files'); - expect($container.find('.filesize').text()).toEqual('500 kB'); + expect($container.find('.filesize').text()).toEqual('500 KB'); expect(s.summary.totalDirs).toEqual(6); expect(s.summary.totalFiles).toEqual(3); expect(s.summary.totalSize).toEqual(512100); @@ -80,7 +80,7 @@ describe('OCA.Files.FileSummary tests', function() { s.update(); expect($container.hasClass('hidden')).toEqual(false); expect($container.find('.info').text()).toEqual('4 folders and 1 file'); - expect($container.find('.filesize').text()).toEqual('125 kB'); + expect($container.find('.filesize').text()).toEqual('125 KB'); expect(s.summary.totalDirs).toEqual(4); expect(s.summary.totalFiles).toEqual(1); expect(s.summary.totalSize).toEqual(127900); @@ -96,7 +96,7 @@ describe('OCA.Files.FileSummary tests', function() { }); expect($container.hasClass('hidden')).toEqual(false); expect($container.find('.info').text()).toEqual('5 folders and 2 files match \'foo\''); - expect($container.find('.filesize').text()).toEqual('250 kB'); + expect($container.find('.filesize').text()).toEqual('250 KB'); }); it('hides filtered summary when no files or folders', function() { var s = new FileSummary($container); @@ -123,7 +123,7 @@ describe('OCA.Files.FileSummary tests', function() { s.update(); expect($container.hasClass('hidden')).toEqual(false); expect($container.find('.info').text()).toEqual('6 folders and 3 files match \'foo\''); - expect($container.find('.filesize').text()).toEqual('500 kB'); + expect($container.find('.filesize').text()).toEqual('500 KB'); expect(s.summary.totalDirs).toEqual(6); expect(s.summary.totalFiles).toEqual(3); expect(s.summary.totalSize).toEqual(512103); @@ -143,7 +143,7 @@ describe('OCA.Files.FileSummary tests', function() { s.update(); expect($container.hasClass('hidden')).toEqual(false); expect($container.find('.info').text()).toEqual('4 folders and 1 file match \'foo\''); - expect($container.find('.filesize').text()).toEqual('125 kB'); + expect($container.find('.filesize').text()).toEqual('125 KB'); expect(s.summary.totalDirs).toEqual(4); expect(s.summary.totalFiles).toEqual(1); expect(s.summary.totalSize).toEqual(127903); |