From 9407f6c1d08b95bbbd751c372c0e571b1e2e1c15 Mon Sep 17 00:00:00 2001 From: Jan-Christoph Borchardt Date: Wed, 1 Nov 2017 11:41:22 +0100 Subject: Fix test for tooltip and local share owner Signed-off-by: Jan-Christoph Borchardt --- core/js/share.js | 5 ++--- core/js/tests/specs/shareSpec.js | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) (limited to 'core') diff --git a/core/js/share.js b/core/js/share.js index 240fc0fb761..c629fb01da4 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -301,16 +301,15 @@ OC.Share = _.extend(OC.Share || {}, { message = t('core', 'Shared by '); avatars = this._formatRemoteShare(owner, message); } else if (recipients) { - avatars = this._formatShareList(recipients.split(", ")).join(""); + avatars = this._formatShareList(recipients.split(', ')).join(''); } action.html(avatars).prepend(icon); if (owner || recipients) { var avatarElement = action.find('.avatar'); avatarElement.avatar(avatarElement.data('username'), 32); - avatarElement.tooltip({placement: 'top'}); - action.find('.remoteAddress').tooltip({placement: 'top'}); + action.find('.icon-shared + span').tooltip({placement: 'top'}); } } else { action.html('' + t('core', 'Shared') + '').prepend(icon); diff --git a/core/js/tests/specs/shareSpec.js b/core/js/tests/specs/shareSpec.js index fbf6eecc8df..cef0d57fc6a 100644 --- a/core/js/tests/specs/shareSpec.js +++ b/core/js/tests/specs/shareSpec.js @@ -58,8 +58,8 @@ describe('OC.Share tests', function() { tooltipStub.reset(); } - it('displays the local share owner as is', function() { - checkOwner('User One', 'User One', null); + it('displays the local share owner with "Shared by" prefix', function() { + checkOwner('User One', 'Shared by User One', null); }); it('displays the user name part of a remote share owner', function() { checkOwner( @@ -240,4 +240,3 @@ describe('OC.Share tests', function() { }); }); }); - -- cgit v1.2.3