Fix test for tooltip and local share owner

Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
pull/6094/head
Jan-Christoph Borchardt 7 years ago
parent a57161f1e7
commit 9407f6c1d0

@ -598,6 +598,10 @@ a.action > img {
margin-left: 6px;
}
#fileList .remoteAddress .userDomain {
margin-left: 0 !important;
}
#fileList .favorite-mark.permanent {
opacity: 1;
}

@ -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('<span class="hidden-visually">' + t('core', 'Shared') + '</span>').prepend(icon);

@ -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() {
});
});
});

Loading…
Cancel
Save