From e1b5a28cbe9a23a926dc8a884127d96133b62641 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Oct 2023 00:56:52 +0000 Subject: [PATCH 1/2] chore(deps): Bump jasmine-core from 2.99.1 to 5.1.1 in /build Bumps [jasmine-core](https://github.com/jasmine/jasmine) from 2.99.1 to 5.1.1. - [Release notes](https://github.com/jasmine/jasmine/releases) - [Changelog](https://github.com/jasmine/jasmine/blob/main/RELEASE.md) - [Commits](https://github.com/jasmine/jasmine/compare/v2.99.1...v5.1.1) --- updated-dependencies: - dependency-name: jasmine-core dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- build/package.json | 2 +- build/yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/build/package.json b/build/package.json index d6933f618abf..7c109230647f 100644 --- a/build/package.json +++ b/build/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "handlebars": "^4.7.8", - "jasmine-core": "^2.99.1", + "jasmine-core": "^5.1.1", "jasmine-sinon": "^0.4.0", "karma": "^6.4.2", "karma-coverage": "*", diff --git a/build/yarn.lock b/build/yarn.lock index afc5f316d9f8..3efd9804cc0d 100644 --- a/build/yarn.lock +++ b/build/yarn.lock @@ -1129,10 +1129,10 @@ istanbul-reports@^3.0.5: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" -jasmine-core@^2.99.1: - version "2.99.1" - resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.99.1.tgz#e6400df1e6b56e130b61c4bcd093daa7f6e8ca15" - integrity sha1-5kAN8ea1bhMLYcS80JPap/boyhU= +jasmine-core@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-5.1.1.tgz#38b6ccfbe60aa2a863cf441751d9639b5a571edc" + integrity sha512-UrzO3fL7nnxlQXlvTynNAenL+21oUQRlzqQFsA2U11ryb4+NLOCOePZ70PTojEaUKhiFugh7dG0Q+I58xlPdWg== jasmine-sinon@^0.4.0: version "0.4.0" From 68df459ab03e51e1839f9917f9f735a5de8ce210 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= <1005065+DeepDiver1975@users.noreply.github.com> Date: Tue, 10 Oct 2023 11:20:29 +0200 Subject: [PATCH 2/2] fix: js tests for jasmine 5.x.x --- apps/files/tests/js/favoritespluginspec.js | 1 + apps/files_external/tests/js/settingsSpec.js | 15 ------------- apps/files_sharing/tests/js/shareSpec.js | 4 ---- apps/files_trashbin/tests/js/filelistSpec.js | 23 -------------------- core/js/tests/specHelper.js | 4 +++- core/js/tests/specs/setupchecksSpec.js | 21 +++++++++--------- 6 files changed, 15 insertions(+), 53 deletions(-) diff --git a/apps/files/tests/js/favoritespluginspec.js b/apps/files/tests/js/favoritespluginspec.js index 35932557fe4b..0ff5be39f2c3 100644 --- a/apps/files/tests/js/favoritespluginspec.js +++ b/apps/files/tests/js/favoritespluginspec.js @@ -27,6 +27,7 @@ describe('OCA.Files.FavoritesPlugin tests', function() { '' + '' ); + OCA.Files.App.initialize(); OC.Plugins.attach('OCA.Files.App', Plugin); fileList = Plugin.showFileList($('#app-content-favorites')); }); diff --git a/apps/files_external/tests/js/settingsSpec.js b/apps/files_external/tests/js/settingsSpec.js index 5a7611fa7c15..943fefd399f1 100644 --- a/apps/files_external/tests/js/settingsSpec.js +++ b/apps/files_external/tests/js/settingsSpec.js @@ -308,15 +308,6 @@ describe('OCA.External.Settings tests', function() { expect(storage.validate()).toBe(false); }); }); - describe('update storage', function() { - // TODO - }); - describe('delete storage', function() { - // TODO - }); - describe('recheck storages', function() { - // TODO - }); describe('mount options dropdown', function() { var $tr; var $td; @@ -414,12 +405,6 @@ describe('OCA.External.Settings tests', function() { }); }); }); - describe('applicable user list', function() { - // TODO: test select2 retrieval logic - }); - describe('allow user mounts section', function() { - // TODO: test allowUserMounting section - }); describe('mountConfigLoaded event is triggered', function() { var view; diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js index 9448382657b0..dca8dae03d84 100644 --- a/apps/files_sharing/tests/js/shareSpec.js +++ b/apps/files_sharing/tests/js/shareSpec.js @@ -72,10 +72,6 @@ describe('OCA.Sharing.Util tests', function() { fileList.destroy(); fileList = null; }); - - describe('Sharing data in table row', function() { - // TODO: test data-permissions, data-share-owner, etc - }); describe('Share action icon', function() { it('do not shows share text when not shared', function() { var $action, $tr; diff --git a/apps/files_trashbin/tests/js/filelistSpec.js b/apps/files_trashbin/tests/js/filelistSpec.js index 0e164de9857b..277c3e2811b3 100644 --- a/apps/files_trashbin/tests/js/filelistSpec.js +++ b/apps/files_trashbin/tests/js/filelistSpec.js @@ -211,29 +211,6 @@ describe('OCA.Trashbin.FileList tests', function() { expect(fileList.$el.find('tbody tr .filesize').length).toEqual(0); }); }); - describe('File actions', function() { - describe('Deleting single files', function() { - // TODO: checks ajax call - // TODO: checks spinner - // TODO: remove item after delete - // TODO: bring back item if delete failed - }); - describe('Restoring single files', function() { - // TODO: checks ajax call - // TODO: checks spinner - // TODO: remove item after restore - // TODO: bring back item if restore failed - }); - }); - describe('file previews', function() { - // TODO: check that preview URL is going through files_trashbin - }); - describe('loading file list', function() { - // TODO: check that ajax URL is going through files_trashbin - }); - describe('breadcrumbs', function() { - // TODO: test label + URL - }); describe('elementToFile', function() { var $tr; diff --git a/core/js/tests/specHelper.js b/core/js/tests/specHelper.js index 23eec8711f67..35d604228daa 100644 --- a/core/js/tests/specHelper.js +++ b/core/js/tests/specHelper.js @@ -97,7 +97,9 @@ window.oc_config = { blacklist_files_regex: '\.(part|filepart)$' }; window.oc_appconfig = { - core: {} + core: {}, + files: {}, + files_sharing: {} }; window.oc_defaults = {}; window.oc_requesttoken = 'testrequesttoken'; diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js index 759e5923ccc0..96ba8ec633f3 100644 --- a/core/js/tests/specs/setupchecksSpec.js +++ b/core/js/tests/specs/setupchecksSpec.js @@ -101,9 +101,9 @@ describe('OC.SetupChecks tests', function() { oc_dataURL = "data"; it('should return an error if data directory is not protected', function(done) { + suite.server.respondWith([ 200, { "Content-Type": "text/plain" }, '*cough*HTACCESSFAIL*cough*']); var async = OC.SetupChecks.checkDataProtected(); - - suite.server.requests[0].respond(200, {'Content-Type': 'text/plain'}, '*cough*HTACCESSFAIL*cough*'); + suite.server.respond(); async.done(function( data, s, x ){ expect(data).toEqual([ @@ -116,9 +116,9 @@ describe('OC.SetupChecks tests', function() { }); it('should not return an error if data directory is protected', function(done) { + suite.server.respondWith([ 403, { "Content-Type": "text/plain" }, '403']); var async = OC.SetupChecks.checkDataProtected(); - - suite.server.requests[0].respond(403); + suite.server.respond(); async.done(function( data, s, x ){ expect(data).toEqual([]); @@ -127,9 +127,9 @@ describe('OC.SetupChecks tests', function() { }); it('should not return an error if data directory is protected and redirects to main page', function(done) { + suite.server.respondWith([200, {'Content-Type': 'text/plain'}, 'blah']); var async = OC.SetupChecks.checkDataProtected(); - - suite.server.requests[0].respond(200, {'Content-Type': 'text/plain'}, 'blah'); + suite.server.respond(); async.done(function( data, s, x ){ expect(data).toEqual([]); @@ -153,9 +153,7 @@ describe('OC.SetupChecks tests', function() { describe('checkSetup', function() { it('should return an error if server has no internet connection', function(done) { - var async = OC.SetupChecks.checkSetup(); - - suite.server.requests[0].respond( + suite.server.respondWith([ 200, { 'Content-Type': 'application/json' @@ -168,7 +166,10 @@ describe('OC.SetupChecks tests', function() { isCorrectMemcachedPHPModuleInstalled: true, hasPassedCodeIntegrityCheck: true, }) - ); + ]); + var async = OC.SetupChecks.checkSetup(); + suite.server.respond(); + async.done(function( data, s, x ){ expect(data).toEqual([