mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-31 07:08:40 -04:00
test: add tests for user-avatar
Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
parent
f557901944
commit
d3c133ced3
2 changed files with 145 additions and 0 deletions
|
@ -0,0 +1,106 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`UserAvatar adds additionalClasses props to wrapping span 1`] = `
|
||||
<div>
|
||||
<span
|
||||
class="d-inline-flex align-items-center testClass"
|
||||
>
|
||||
<img
|
||||
alt="common.avatarOf"
|
||||
class="rounded user-image"
|
||||
height="20"
|
||||
src="https://example.com/test.png"
|
||||
title="Boaty McBoatFace"
|
||||
width="20"
|
||||
/>
|
||||
<span
|
||||
class="ml-2 mr-1 user-line-name"
|
||||
>
|
||||
Boaty McBoatFace
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`UserAvatar does not show names if showName prop is false 1`] = `
|
||||
<div>
|
||||
<span
|
||||
class="d-inline-flex align-items-center "
|
||||
>
|
||||
<img
|
||||
alt="common.avatarOf"
|
||||
class="rounded user-image"
|
||||
height="20"
|
||||
src="https://example.com/test.png"
|
||||
title="Boaty McBoatFace"
|
||||
width="20"
|
||||
/>
|
||||
</span>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`UserAvatar renders the user avatar correctly 1`] = `
|
||||
<div>
|
||||
<span
|
||||
class="d-inline-flex align-items-center "
|
||||
>
|
||||
<img
|
||||
alt="common.avatarOf"
|
||||
class="rounded user-image"
|
||||
height="20"
|
||||
src="https://example.com/test.png"
|
||||
title="Boaty McBoatFace"
|
||||
width="20"
|
||||
/>
|
||||
<span
|
||||
class="ml-2 mr-1 user-line-name"
|
||||
>
|
||||
Boaty McBoatFace
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`UserAvatar renders the user avatar in size lg 1`] = `
|
||||
<div>
|
||||
<span
|
||||
class="d-inline-flex align-items-center "
|
||||
>
|
||||
<img
|
||||
alt="common.avatarOf"
|
||||
class="rounded user-image"
|
||||
height="30"
|
||||
src="https://example.com/test.png"
|
||||
title="Boaty McBoatFace"
|
||||
width="30"
|
||||
/>
|
||||
<span
|
||||
class="ml-2 mr-1 user-line-name"
|
||||
>
|
||||
Boaty McBoatFace
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
`;
|
||||
|
||||
exports[`UserAvatar renders the user avatar in size sm 1`] = `
|
||||
<div>
|
||||
<span
|
||||
class="d-inline-flex align-items-center "
|
||||
>
|
||||
<img
|
||||
alt="common.avatarOf"
|
||||
class="rounded user-image"
|
||||
height="16"
|
||||
src="https://example.com/test.png"
|
||||
title="Boaty McBoatFace"
|
||||
width="16"
|
||||
/>
|
||||
<span
|
||||
class="ml-2 mr-1 user-line-name"
|
||||
>
|
||||
Boaty McBoatFace
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
`;
|
Loading…
Add table
Add a link
Reference in a new issue