mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
* calculate distance between current user and queried user * fix query for unset location * use database to calculate distance * rename distance to distance to me, 100% calculation done in DB * distanceToMe tests * lint fixes * remove comments * Show user teaser popover with badges, Desktop * Refactor UserTeaser and add mobile popover support * Avoid click propagation (WIP) * Prevent event propagation * Adjust alignment and font sizes * More spacing for statistics * Add distance, simplify user link * Refactor location info into own component * Add tests for UserTeaserPopup * Refactor and test LocationInfo * Query distanceToMe, rename distance to distanceToMe * Update test * Improve tests for UserTeaser, WIP * Fix tests * DistanceToMe on User instead of Location * Revert "DistanceToMe on User instead of Location" This reverts commit 96c9db00a44cd120e47bfe9534d3e066a194744c. * Fix notifications * Refactor UserTeaser and fix location info * Fix group member crash * Show 0 distance * Fit in popover on small screens * Allow access to profile on desktop * Revert backend changes * Load user teaser popover data only when needed * Fix type mismatch * Refactor for clarity and accessibility * Litte refactorings and improvements * Fix popover test * Adapt and fix tests * Fix tests and bugs * Add placeholder * cypress: adapt user teaser locator to changes * Remove delays and scrolling * Disable popovers in notification list and fix layout * Remove flickering * Make overlay catch all pointer events on touch devices * Re-add attribute for E2E test * Fix test, return to mouseover * fix snapshot --------- Co-authored-by: Ulf Gebhardt <ulf.gebhardt@webcraft-media.de> Co-authored-by: Wolfgang Huß <wolle.huss@pjannto.com> Co-authored-by: mahula <lenzmath@posteo.de>
1137 lines
24 KiB
Plaintext
1137 lines
24 KiB
Plaintext
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
exports[`UserTeaser given an user avatar is disabled does not render the avatar 1`] = `
|
|
<div>
|
|
<div
|
|
class=""
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<!---->
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<a>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</a>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div />
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user user is deleted even if the current user is a moderator renders anonymous user 1`] = `
|
|
<div>
|
|
<div
|
|
class="user-teaser"
|
|
>
|
|
<div
|
|
class="profile-avatar --small --no-image"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
|
|
</span>
|
|
|
|
<span
|
|
class="base-icon"
|
|
>
|
|
<!---->
|
|
</span>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<span
|
|
class="info anonymous"
|
|
>
|
|
profile.userAnonym
|
|
</span>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user user is deleted renders anonymous user 1`] = `
|
|
<div>
|
|
<div
|
|
class="user-teaser"
|
|
>
|
|
<div
|
|
class="profile-avatar --small --no-image"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
|
|
</span>
|
|
|
|
<span
|
|
class="base-icon"
|
|
>
|
|
<!---->
|
|
</span>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<span
|
|
class="info anonymous"
|
|
>
|
|
profile.userAnonym
|
|
</span>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user user is disabled current user is a moderator renders user name 1`] = `
|
|
<div>
|
|
<div
|
|
class="disabled-content"
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<a
|
|
data-test="avatarUserLink"
|
|
>
|
|
<div
|
|
class="profile-avatar --small"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
TS
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<img
|
|
alt="Tilda Swinton"
|
|
class="image"
|
|
src="/api/avatars/tilda-swinton"
|
|
title="Tilda Swinton"
|
|
/>
|
|
</div>
|
|
</a>
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<a>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</a>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div />
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user user is disabled renders anonymous user 1`] = `
|
|
<div>
|
|
<div
|
|
class="user-teaser"
|
|
>
|
|
<div
|
|
class="profile-avatar --small --no-image"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
|
|
</span>
|
|
|
|
<span
|
|
class="base-icon"
|
|
>
|
|
<!---->
|
|
</span>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<span
|
|
class="info anonymous"
|
|
>
|
|
profile.userAnonym
|
|
</span>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user with linkToProfile, on desktop renders 1`] = `
|
|
<div>
|
|
<div
|
|
class=""
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<a
|
|
data-test="avatarUserLink"
|
|
>
|
|
<div
|
|
class="profile-avatar --small"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
TS
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<img
|
|
alt="Tilda Swinton"
|
|
class="image"
|
|
src="/api/avatars/tilda-swinton"
|
|
title="Tilda Swinton"
|
|
/>
|
|
</div>
|
|
</a>
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<a>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</a>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div />
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user with linkToProfile, on desktop when hovering the user name renders the popover 1`] = `
|
|
<div>
|
|
<div
|
|
class=""
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
open="true"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<a
|
|
data-test="avatarUserLink"
|
|
>
|
|
<div
|
|
class="profile-avatar --small"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
TS
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<img
|
|
alt="Tilda Swinton"
|
|
class="image"
|
|
src="/api/avatars/tilda-swinton"
|
|
title="Tilda Swinton"
|
|
/>
|
|
</div>
|
|
</a>
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<a>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</a>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div>
|
|
<user-teaser-popover-stub
|
|
user-id="user1"
|
|
user-link="[object Object]"
|
|
/>
|
|
</div>
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user with linkToProfile, on touch screen renders 1`] = `
|
|
<div>
|
|
<div
|
|
class=""
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<button
|
|
data-test="avatarUserLink"
|
|
>
|
|
<div
|
|
class="profile-avatar --small"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
TS
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<img
|
|
alt="Tilda Swinton"
|
|
class="image"
|
|
src="/api/avatars/tilda-swinton"
|
|
title="Tilda Swinton"
|
|
/>
|
|
</div>
|
|
</button>
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<button>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</button>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div />
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user with linkToProfile, on touch screen when clicking the user name renders the popover 1`] = `
|
|
<div>
|
|
<div
|
|
class=""
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
open="true"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<button
|
|
data-test="avatarUserLink"
|
|
>
|
|
<div
|
|
class="profile-avatar --small"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
TS
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<img
|
|
alt="Tilda Swinton"
|
|
class="image"
|
|
src="/api/avatars/tilda-swinton"
|
|
title="Tilda Swinton"
|
|
/>
|
|
</div>
|
|
</button>
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<button>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</button>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div>
|
|
<user-teaser-popover-stub
|
|
user-id="user1"
|
|
user-link="[object Object]"
|
|
/>
|
|
</div>
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user without linkToProfile, on desktop renders 1`] = `
|
|
<div>
|
|
<div
|
|
class=""
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<span
|
|
data-test="avatarUserLink"
|
|
>
|
|
<div
|
|
class="profile-avatar --small"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
TS
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<img
|
|
alt="Tilda Swinton"
|
|
class="image"
|
|
src="/api/avatars/tilda-swinton"
|
|
title="Tilda Swinton"
|
|
/>
|
|
</div>
|
|
</span>
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<span>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div />
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user without linkToProfile, on desktop when hovering the user avatar renders the popover 1`] = `
|
|
<div>
|
|
<div
|
|
class=""
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
open="true"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<span
|
|
data-test="avatarUserLink"
|
|
>
|
|
<div
|
|
class="profile-avatar --small"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
TS
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<img
|
|
alt="Tilda Swinton"
|
|
class="image"
|
|
src="/api/avatars/tilda-swinton"
|
|
title="Tilda Swinton"
|
|
/>
|
|
</div>
|
|
</span>
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<span>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div>
|
|
<user-teaser-popover-stub
|
|
user-id="user1"
|
|
/>
|
|
</div>
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user without linkToProfile, on desktop when hovering the user name renders the popover 1`] = `
|
|
<div>
|
|
<div
|
|
class=""
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
open="true"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<span
|
|
data-test="avatarUserLink"
|
|
>
|
|
<div
|
|
class="profile-avatar --small"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
TS
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<img
|
|
alt="Tilda Swinton"
|
|
class="image"
|
|
src="/api/avatars/tilda-swinton"
|
|
title="Tilda Swinton"
|
|
/>
|
|
</div>
|
|
</span>
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<span>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div>
|
|
<user-teaser-popover-stub
|
|
user-id="user1"
|
|
/>
|
|
</div>
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user without linkToProfile, on touch screen renders 1`] = `
|
|
<div>
|
|
<div
|
|
class=""
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<button
|
|
data-test="avatarUserLink"
|
|
>
|
|
<div
|
|
class="profile-avatar --small"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
TS
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<img
|
|
alt="Tilda Swinton"
|
|
class="image"
|
|
src="/api/avatars/tilda-swinton"
|
|
title="Tilda Swinton"
|
|
/>
|
|
</div>
|
|
</button>
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<button>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</button>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div />
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user without linkToProfile, on touch screen when clicking the user avatar renders the popover 1`] = `
|
|
<div>
|
|
<div
|
|
class=""
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
open="true"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<button
|
|
data-test="avatarUserLink"
|
|
>
|
|
<div
|
|
class="profile-avatar --small"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
TS
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<img
|
|
alt="Tilda Swinton"
|
|
class="image"
|
|
src="/api/avatars/tilda-swinton"
|
|
title="Tilda Swinton"
|
|
/>
|
|
</div>
|
|
</button>
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<button>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</button>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div>
|
|
<user-teaser-popover-stub
|
|
user-id="user1"
|
|
/>
|
|
</div>
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser given an user without linkToProfile, on touch screen when clicking the user name renders the popover 1`] = `
|
|
<div>
|
|
<div
|
|
class=""
|
|
placement="top-start"
|
|
>
|
|
<client-only-stub>
|
|
<v-popover-stub
|
|
autohide="true"
|
|
class="user-teaser"
|
|
container="body"
|
|
delay="0"
|
|
handleresize="true"
|
|
offset="16"
|
|
open="true"
|
|
openclass="open"
|
|
opengroup="0"
|
|
placement="bottom-end"
|
|
popoverarrowclass="tooltip-arrow popover-arrow"
|
|
popoverbaseclass="tooltip popover"
|
|
popoverclass="vue-popover-theme"
|
|
popoverinnerclass="tooltip-inner popover-inner"
|
|
popoverwrapperclass="wrapper"
|
|
popperoptions="[object Object]"
|
|
trigger="manual"
|
|
>
|
|
<button
|
|
data-test="avatarUserLink"
|
|
>
|
|
<div
|
|
class="profile-avatar --small"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
TS
|
|
</span>
|
|
|
|
<!---->
|
|
|
|
<img
|
|
alt="Tilda Swinton"
|
|
class="image"
|
|
src="/api/avatars/tilda-swinton"
|
|
title="Tilda Swinton"
|
|
/>
|
|
</div>
|
|
</button>
|
|
|
|
<div
|
|
class="info flex-direction-column"
|
|
>
|
|
<div
|
|
class="flex-direction-column"
|
|
>
|
|
<button>
|
|
<span
|
|
class="slug"
|
|
>
|
|
@tilda-swinton
|
|
</span>
|
|
|
|
<span
|
|
class="name"
|
|
>
|
|
Tilda Swinton
|
|
</span>
|
|
</button>
|
|
|
|
<!---->
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<div>
|
|
<user-teaser-popover-stub
|
|
user-id="user1"
|
|
/>
|
|
</div>
|
|
</v-popover-stub>
|
|
</client-only-stub>
|
|
</div>
|
|
</div>
|
|
`;
|
|
|
|
exports[`UserTeaser renders anonymous user 1`] = `
|
|
<div>
|
|
<div
|
|
class="user-teaser"
|
|
>
|
|
<div
|
|
class="profile-avatar --small --no-image"
|
|
>
|
|
<span
|
|
class="initials"
|
|
>
|
|
|
|
</span>
|
|
|
|
<span
|
|
class="base-icon"
|
|
>
|
|
<!---->
|
|
</span>
|
|
|
|
<!---->
|
|
</div>
|
|
|
|
<span
|
|
class="info anonymous"
|
|
>
|
|
profile.userAnonym
|
|
</span>
|
|
</div>
|
|
</div>
|
|
`;
|