diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-06-27 13:36:18 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-06-27 13:41:01 +0200 |
commit | 586b3a9683421181b7cd66aff2d3fabd0f34531e (patch) | |
tree | 387b4488859d0173f164d5f94d9b5b58ea1f8a05 /apps/files_sharing/tests/js | |
parent | 4d6019b73fd8b1a1d8e8fecbeb129bea12feb89d (diff) | |
download | nextcloud-server-586b3a9683421181b7cd66aff2d3fabd0f34531e.tar.gz nextcloud-server-586b3a9683421181b7cd66aff2d3fabd0f34531e.zip |
Sync file list with file actions
Whenever file actions are registered later, now the file lists are
automatically notified.
Added FileActions.addUpdateListener() to be able to receive such
notifications.
This removes the need for apps to manually call FileActions.display()
after registering new actions.
This fixes issues with race conditions when file actions are
registered after the file list was already rendered.
Diffstat (limited to 'apps/files_sharing/tests/js')
-rw-r--r-- | apps/files_sharing/tests/js/appSpec.js | 2 | ||||
-rw-r--r-- | apps/files_sharing/tests/js/shareSpec.js | 2 | ||||
-rw-r--r-- | apps/files_sharing/tests/js/sharedfilelistSpec.js | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/js/appSpec.js b/apps/files_sharing/tests/js/appSpec.js index 9c46b7caf1b..d0480ad1aa4 100644 --- a/apps/files_sharing/tests/js/appSpec.js +++ b/apps/files_sharing/tests/js/appSpec.js @@ -47,6 +47,8 @@ describe('OCA.Sharing.App tests', function() { afterEach(function() { App._inFileList = null; App._outFileList = null; + fileListIn.destroy(); + fileListOut.destroy(); fileListIn = null; fileListOut = null; }); diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js index 455addaccc0..3d4fc754821 100644 --- a/apps/files_sharing/tests/js/shareSpec.js +++ b/apps/files_sharing/tests/js/shareSpec.js @@ -70,6 +70,8 @@ describe('OCA.Sharing.Util tests', function() { OCA.Files.FileList.prototype = oldFileListPrototype; delete OCA.Sharing.sharesLoaded; delete OC.Share.droppedDown; + fileList.destroy(); + fileList = null; OC.Share.statuses = {}; OC.Share.currentShares = {}; }); diff --git a/apps/files_sharing/tests/js/sharedfilelistSpec.js b/apps/files_sharing/tests/js/sharedfilelistSpec.js index 0f6d0a0ba49..4e130885500 100644 --- a/apps/files_sharing/tests/js/sharedfilelistSpec.js +++ b/apps/files_sharing/tests/js/sharedfilelistSpec.js @@ -55,6 +55,7 @@ describe('OCA.Sharing.FileList tests', function() { afterEach(function() { OCA.Files.FileList.prototype = oldFileListPrototype; testFiles = undefined; + fileList.destroy(); fileList = undefined; fileActions = undefined; |