summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/tests/js/shareSpec.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-07-01 21:32:04 +0200
committerVincent Petry <pvince81@owncloud.com>2014-07-01 21:32:04 +0200
commit025b71d068bf530581693af67a31a56dca24beb1 (patch)
tree1d3aeda7b7f569b02adf96399896b1a59c307913 /apps/files_sharing/tests/js/shareSpec.js
parent509cdebab7bb99c34467b053a2e596f48a10399d (diff)
downloadnextcloud-server-025b71d068bf530581693af67a31a56dca24beb1.tar.gz
nextcloud-server-025b71d068bf530581693af67a31a56dca24beb1.zip
Use fileActionsReady to re-render sharing icons
Whenever file actions are modified, either by registering new actions or when appending a new page of entries, the sharing app is now notified so it can correctly refresh the sharing icon status. Additionally, the core's loadIcons() method is also used to load the existing shares and also refresh the sharing icons afterwards.
Diffstat (limited to 'apps/files_sharing/tests/js/shareSpec.js')
-rw-r--r--apps/files_sharing/tests/js/shareSpec.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/files_sharing/tests/js/shareSpec.js b/apps/files_sharing/tests/js/shareSpec.js
index 3d4fc754821..600859b4e7d 100644
--- a/apps/files_sharing/tests/js/shareSpec.js
+++ b/apps/files_sharing/tests/js/shareSpec.js
@@ -80,6 +80,14 @@ describe('OCA.Sharing.Util tests', function() {
// TODO: test data-permissions, data-share-owner, etc
});
describe('Share action icon', function() {
+ beforeEach(function() {
+ OC.Share.statuses = {1: {link: false, path: '/subdir'}};
+ OCA.Sharing.sharesLoaded = true;
+ });
+ afterEach(function() {
+ OC.Share.statuses = {};
+ OCA.Sharing.sharesLoaded = false;
+ });
it('do not shows share text when not shared', function() {
var $action, $tr;
OC.Share.statuses = {};