summaryrefslogtreecommitdiffstats
path: root/apps/files/tests
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2023-04-04 18:42:29 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-04-06 15:31:37 +0200
commitf060e5a72fa152ce48dd5a32ef14c1f270aefa38 (patch)
treec50743fb55d012651ef2cfb7864e78aae4d9a051 /apps/files/tests
parent13611824395d1a187b28f153e933b5ff56a4e566 (diff)
downloadnextcloud-server-f060e5a72fa152ce48dd5a32ef14c1f270aefa38.tar.gz
nextcloud-server-f060e5a72fa152ce48dd5a32ef14c1f270aefa38.zip
fix(tests): update jsunit tests after dep and files update
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files/tests')
-rw-r--r--apps/files/tests/js/fileUploadSpec.js2
-rw-r--r--apps/files/tests/js/filelistSpec.js6
-rw-r--r--apps/files/tests/js/filesummarySpec.js18
-rw-r--r--apps/files/tests/js/mainfileinfodetailviewSpec.js2
4 files changed, 14 insertions, 14 deletions
diff --git a/apps/files/tests/js/fileUploadSpec.js b/apps/files/tests/js/fileUploadSpec.js
index 1fac6322808..e15514b39e2 100644
--- a/apps/files/tests/js/fileUploadSpec.js
+++ b/apps/files/tests/js/fileUploadSpec.js
@@ -119,7 +119,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 1 KB is left'
);
setTimeout(done, 0);
});
diff --git a/apps/files/tests/js/filelistSpec.js b/apps/files/tests/js/filelistSpec.js
index cd3510c2faa..f2caa176973 100644
--- a/apps/files/tests/js/filelistSpec.js
+++ b/apps/files/tests/js/filelistSpec.js
@@ -539,7 +539,7 @@ describe('OCA.Files.FileList tests', function() {
expect($summary.find('.fileinfo').text()).toEqual('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('70 KB');
expect(fileList.isEmpty).toEqual(false);
});
it('Shows empty content when removing last file', function() {
@@ -609,7 +609,7 @@ describe('OCA.Files.FileList tests', function() {
expect($summary.find('.fileinfo').text()).toEqual('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('58 KB');
expect(fileList.isEmpty).toEqual(false);
expect($('.files-filestable thead th').hasClass('hidden')).toEqual(false);
expect($('.emptyfilelist.emptycontent').hasClass('hidden')).toEqual(true);
@@ -1138,7 +1138,7 @@ describe('OCA.Files.FileList tests', function() {
expect($summary.hasClass('hidden')).toEqual(false);
expect($summary.find('.dirinfo').text()).toEqual('1 folder');
expect($summary.find('.fileinfo').text()).toEqual('3 files');
- expect($summary.find('.filesize').text()).toEqual('69 KB');
+ expect($summary.find('.filesize').text()).toEqual('70 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 8bc7bd8f995..22c95abd307 100644
--- a/apps/files/tests/js/filesummarySpec.js
+++ b/apps/files/tests/js/filesummarySpec.js
@@ -44,7 +44,7 @@ describe('OCA.Files.FileSummary tests', function() {
expect($container.hasClass('hidden')).toEqual(false);
expect($container.find('.dirinfo').text()).toEqual('5 folders');
expect($container.find('.fileinfo').text()).toEqual('2 files');
- expect($container.find('.filesize').text()).toEqual('250 KB');
+ expect($container.find('.filesize').text()).toEqual('256 KB');
});
it('hides summary when no files or folders', function() {
var s = new FileSummary($container);
@@ -68,7 +68,7 @@ describe('OCA.Files.FileSummary tests', function() {
expect($container.hasClass('hidden')).toEqual(false);
expect($container.find('.dirinfo').text()).toEqual('6 folders');
expect($container.find('.fileinfo').text()).toEqual('3 files');
- expect($container.find('.filesize').text()).toEqual('500 KB');
+ expect($container.find('.filesize').text()).toEqual('512 KB');
expect(s.summary.totalDirs).toEqual(6);
expect(s.summary.totalFiles).toEqual(3);
expect(s.summary.totalSize).toEqual(512100);
@@ -86,7 +86,7 @@ describe('OCA.Files.FileSummary tests', function() {
expect($container.hasClass('hidden')).toEqual(false);
expect($container.find('.dirinfo').text()).toEqual('4 folders');
expect($container.find('.fileinfo').text()).toEqual('1 file');
- expect($container.find('.filesize').text()).toEqual('125 KB');
+ expect($container.find('.filesize').text()).toEqual('128 KB');
expect(s.summary.totalDirs).toEqual(4);
expect(s.summary.totalFiles).toEqual(1);
expect(s.summary.totalSize).toEqual(127900);
@@ -104,7 +104,7 @@ describe('OCA.Files.FileSummary tests', function() {
expect($container.find('.dirinfo').text()).toEqual('5 folders');
expect($container.find('.fileinfo').text()).toEqual('2 files');
expect($container.find('.filter').text()).toEqual(' match "foo"');
- expect($container.find('.filesize').text()).toEqual('250 KB');
+ expect($container.find('.filesize').text()).toEqual('256 KB');
});
it('hides filtered summary when no files or folders', function() {
var s = new FileSummary($container);
@@ -133,7 +133,7 @@ describe('OCA.Files.FileSummary tests', function() {
expect($container.find('.dirinfo').text()).toEqual('6 folders');
expect($container.find('.fileinfo').text()).toEqual('3 files');
expect($container.find('.filter').text()).toEqual(' match "foo"');
- expect($container.find('.filesize').text()).toEqual('500 KB');
+ expect($container.find('.filesize').text()).toEqual('512 KB');
expect(s.summary.totalDirs).toEqual(6);
expect(s.summary.totalFiles).toEqual(3);
expect(s.summary.totalSize).toEqual(512103);
@@ -155,7 +155,7 @@ describe('OCA.Files.FileSummary tests', function() {
expect($container.find('.dirinfo').text()).toEqual('4 folders');
expect($container.find('.fileinfo').text()).toEqual('1 file');
expect($container.find('.filter').text()).toEqual(' match "foo"');
- expect($container.find('.filesize').text()).toEqual('125 KB');
+ expect($container.find('.filesize').text()).toEqual('128 KB');
expect(s.summary.totalDirs).toEqual(4);
expect(s.summary.totalFiles).toEqual(1);
expect(s.summary.totalSize).toEqual(127903);
@@ -215,7 +215,7 @@ describe('OCA.Files.FileSummary tests', function() {
expect($container.find('.fileinfo').text()).toEqual('1 file');
expect($container.find('.hiddeninfo').hasClass('hidden')).toEqual(false);
expect($container.find('.hiddeninfo').text()).toEqual(' (including 1 hidden)');
- expect($container.find('.filesize').text()).toEqual('750 KB');
+ expect($container.find('.filesize').text()).toEqual('768 KB');
});
it('does not render hidden count section when hidden files exist but are visible', function() {
window._nc_event_bus.emit('files:config:updated', { key: 'show_hidden', value: true });
@@ -228,7 +228,7 @@ describe('OCA.Files.FileSummary tests', function() {
expect($container.find('.dirinfo').text()).toEqual('2 folders');
expect($container.find('.fileinfo').text()).toEqual('1 file');
expect($container.find('.hiddeninfo').hasClass('hidden')).toEqual(true);
- expect($container.find('.filesize').text()).toEqual('750 KB');
+ expect($container.find('.filesize').text()).toEqual('768 KB');
});
it('does not render hidden count section when no hidden files exist', function() {
window._nc_event_bus.emit('files:config:updated', { key: 'show_hidden', value: false });
@@ -240,7 +240,7 @@ describe('OCA.Files.FileSummary tests', function() {
expect($container.find('.dirinfo').text()).toEqual('1 folder');
expect($container.find('.fileinfo').text()).toEqual('1 file');
expect($container.find('.hiddeninfo').hasClass('hidden')).toEqual(true);
- expect($container.find('.filesize').text()).toEqual('250 KB');
+ expect($container.find('.filesize').text()).toEqual('256 KB');
});
});
});
diff --git a/apps/files/tests/js/mainfileinfodetailviewSpec.js b/apps/files/tests/js/mainfileinfodetailviewSpec.js
index 5793db8fb98..b63c36199a6 100644
--- a/apps/files/tests/js/mainfileinfodetailviewSpec.js
+++ b/apps/files/tests/js/mainfileinfodetailviewSpec.js
@@ -62,7 +62,7 @@ describe('OCA.Files.MainFileInfoDetailView tests', function() {
view.setFileInfo(testFileInfo);
expect(view.$el.find('.fileName h3').text()).toEqual('One.txt');
expect(view.$el.find('.fileName h3').attr('title')).toEqual('One.txt');
- expect(view.$el.find('.size').text()).toEqual('117.7 MB');
+ expect(view.$el.find('.size').text()).toEqual('123.5 MB');
expect(view.$el.find('.size').attr('title')).toEqual('123456789 bytes');
expect(view.$el.find('.date').text()).toEqual('seconds ago');
expect(view.$el.find('.date').attr('title')).toEqual(dateExpected);