2023-03-08 15:06:50 +03:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2023-03-13 17:43:13 +03:00
|
|
|
exports[`<Pill> should not render a non-permalink 1`] = `
|
|
|
|
<DocumentFragment>
|
|
|
|
<div />
|
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
2023-03-09 14:48:36 +03:00
|
|
|
|
2023-03-08 15:06:50 +03:00
|
|
|
exports[`<Pill> should not render an avatar or link when called with inMessage = false and shouldShowPillAvatar = false 1`] = `
|
|
|
|
<DocumentFragment>
|
2023-03-13 17:43:13 +03:00
|
|
|
<div>
|
|
|
|
<bdi>
|
2023-03-08 15:06:50 +03:00
|
|
|
<span
|
2023-12-21 18:21:41 +03:00
|
|
|
data-state="closed"
|
|
|
|
tabindex="0"
|
2023-03-08 15:06:50 +03:00
|
|
|
>
|
2023-03-13 17:43:13 +03:00
|
|
|
<span
|
2023-12-21 18:21:41 +03:00
|
|
|
class="mx_Pill mx_RoomPill"
|
2023-03-13 17:43:13 +03:00
|
|
|
>
|
2023-12-21 18:21:41 +03:00
|
|
|
<span
|
|
|
|
class="mx_Pill_text"
|
|
|
|
>
|
|
|
|
Room 1
|
|
|
|
</span>
|
2023-03-13 17:43:13 +03:00
|
|
|
</span>
|
2023-03-08 15:06:50 +03:00
|
|
|
</span>
|
2023-03-13 17:43:13 +03:00
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 15:06:50 +03:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`<Pill> should render the expected pill for @room 1`] = `
|
|
|
|
<DocumentFragment>
|
2023-03-13 17:43:13 +03:00
|
|
|
<div>
|
|
|
|
<bdi>
|
2023-03-08 15:06:50 +03:00
|
|
|
<span
|
2023-12-21 18:21:41 +03:00
|
|
|
data-state="closed"
|
|
|
|
tabindex="0"
|
2023-03-08 15:06:50 +03:00
|
|
|
>
|
|
|
|
<span
|
2023-12-21 18:21:41 +03:00
|
|
|
class="mx_Pill mx_AtRoomPill"
|
2023-03-13 17:43:13 +03:00
|
|
|
>
|
2023-12-21 18:21:41 +03:00
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 17:40:03 +03:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2024-02-07 20:26:05 +03:00
|
|
|
data-color="1"
|
2023-12-21 18:21:41 +03:00
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
|
|
|
role="presentation"
|
|
|
|
style="--cpd-avatar-size: 16px;"
|
|
|
|
>
|
|
|
|
R
|
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
class="mx_Pill_text"
|
|
|
|
>
|
|
|
|
@room
|
|
|
|
</span>
|
2023-03-08 15:06:50 +03:00
|
|
|
</span>
|
|
|
|
</span>
|
2023-03-13 17:43:13 +03:00
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 15:06:50 +03:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
2023-03-27 11:07:43 +03:00
|
|
|
exports[`<Pill> should render the expected pill for a known user not in the room 1`] = `
|
2023-03-21 12:23:20 +03:00
|
|
|
<DocumentFragment>
|
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
2023-03-27 11:07:43 +03:00
|
|
|
class="mx_Pill mx_UserPill"
|
2023-12-21 18:21:41 +03:00
|
|
|
data-state="closed"
|
2023-03-27 11:07:43 +03:00
|
|
|
href="https://matrix.to/#/@user2:example.com"
|
2023-03-21 12:23:20 +03:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 17:40:03 +03:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2023-08-24 06:48:35 +03:00
|
|
|
data-color="5"
|
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-21 12:23:20 +03:00
|
|
|
role="presentation"
|
2023-08-24 06:48:35 +03:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-21 12:23:20 +03:00
|
|
|
>
|
2023-08-24 06:48:35 +03:00
|
|
|
U
|
2023-03-21 12:23:20 +03:00
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
class="mx_Pill_text"
|
|
|
|
>
|
2023-03-27 11:07:43 +03:00
|
|
|
User 2
|
2023-03-21 12:23:20 +03:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
2023-03-27 11:07:43 +03:00
|
|
|
exports[`<Pill> should render the expected pill for a message in another room 1`] = `
|
2023-03-21 12:23:20 +03:00
|
|
|
<DocumentFragment>
|
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
|
|
|
class="mx_Pill mx_EventPill"
|
2023-12-21 18:21:41 +03:00
|
|
|
data-state="closed"
|
2023-03-21 12:23:20 +03:00
|
|
|
href="https://matrix.to/#/!room1:example.com/$123-456"
|
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 17:40:03 +03:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2024-02-07 20:26:05 +03:00
|
|
|
data-color="1"
|
2023-08-24 06:48:35 +03:00
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-21 12:23:20 +03:00
|
|
|
role="presentation"
|
2023-08-24 06:48:35 +03:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-21 12:23:20 +03:00
|
|
|
>
|
2023-08-24 06:48:35 +03:00
|
|
|
R
|
2023-03-21 12:23:20 +03:00
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
class="mx_Pill_text"
|
|
|
|
>
|
2023-03-27 11:07:43 +03:00
|
|
|
Message in Room 1
|
2023-03-21 12:23:20 +03:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
2023-03-27 11:07:43 +03:00
|
|
|
exports[`<Pill> should render the expected pill for a message in the same room 1`] = `
|
2023-03-08 15:06:50 +03:00
|
|
|
<DocumentFragment>
|
2023-03-13 17:43:13 +03:00
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
2023-03-27 11:07:43 +03:00
|
|
|
class="mx_Pill mx_EventPill"
|
2023-12-21 18:21:41 +03:00
|
|
|
data-state="closed"
|
2023-03-27 11:07:43 +03:00
|
|
|
href="https://matrix.to/#/!room1:example.com/$123-456"
|
2023-03-08 15:06:50 +03:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 17:40:03 +03:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2023-08-24 06:48:35 +03:00
|
|
|
data-color="4"
|
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-13 17:43:13 +03:00
|
|
|
role="presentation"
|
2023-08-24 06:48:35 +03:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-08 15:06:50 +03:00
|
|
|
>
|
2023-08-24 06:48:35 +03:00
|
|
|
U
|
2023-03-08 15:06:50 +03:00
|
|
|
</span>
|
2023-03-13 17:43:13 +03:00
|
|
|
<span
|
2023-03-21 12:23:20 +03:00
|
|
|
class="mx_Pill_text"
|
2023-03-13 17:43:13 +03:00
|
|
|
>
|
2023-03-27 11:07:43 +03:00
|
|
|
Message from User 1
|
2023-03-13 17:43:13 +03:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 15:06:50 +03:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
2023-03-27 11:07:43 +03:00
|
|
|
exports[`<Pill> should render the expected pill for a room alias 1`] = `
|
2023-03-09 14:48:36 +03:00
|
|
|
<DocumentFragment>
|
2023-03-13 17:43:13 +03:00
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
|
|
|
class="mx_Pill mx_RoomPill"
|
2023-12-21 18:21:41 +03:00
|
|
|
data-state="closed"
|
2023-03-27 11:07:43 +03:00
|
|
|
href="https://matrix.to/#/#room1:example.com"
|
2023-03-09 14:48:36 +03:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 17:40:03 +03:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2024-02-07 20:26:05 +03:00
|
|
|
data-color="1"
|
2023-08-24 06:48:35 +03:00
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-13 17:43:13 +03:00
|
|
|
role="presentation"
|
2023-08-24 06:48:35 +03:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-09 14:48:36 +03:00
|
|
|
>
|
2023-08-24 06:48:35 +03:00
|
|
|
R
|
2023-03-09 14:48:36 +03:00
|
|
|
</span>
|
2023-03-13 17:43:13 +03:00
|
|
|
<span
|
2023-03-21 12:23:20 +03:00
|
|
|
class="mx_Pill_text"
|
2023-03-13 17:43:13 +03:00
|
|
|
>
|
2023-03-27 11:07:43 +03:00
|
|
|
Room 1
|
2023-03-13 17:43:13 +03:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-09 14:48:36 +03:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
2023-03-27 11:07:43 +03:00
|
|
|
exports[`<Pill> should render the expected pill for a space 1`] = `
|
2023-03-08 15:06:50 +03:00
|
|
|
<DocumentFragment>
|
2023-03-13 17:43:13 +03:00
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
2023-03-27 11:07:43 +03:00
|
|
|
class="mx_Pill mx_RoomPill"
|
2023-12-21 18:21:41 +03:00
|
|
|
data-state="closed"
|
2023-03-27 11:07:43 +03:00
|
|
|
href="https://matrix.to/#/!space1:example.com"
|
2023-03-08 15:06:50 +03:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 17:40:03 +03:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2023-08-24 06:48:35 +03:00
|
|
|
data-color="2"
|
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-13 17:43:13 +03:00
|
|
|
role="presentation"
|
2023-08-24 06:48:35 +03:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-08 15:06:50 +03:00
|
|
|
>
|
2023-08-24 06:48:35 +03:00
|
|
|
S
|
2023-03-08 15:06:50 +03:00
|
|
|
</span>
|
2023-03-13 17:43:13 +03:00
|
|
|
<span
|
2023-03-21 12:23:20 +03:00
|
|
|
class="mx_Pill_text"
|
2023-03-13 17:43:13 +03:00
|
|
|
>
|
2023-03-27 11:07:43 +03:00
|
|
|
Space 1
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`<Pill> should render the expected pill for an uknown user not in the room 1`] = `
|
|
|
|
<DocumentFragment>
|
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
|
|
|
class="mx_Pill mx_UserPill"
|
2023-12-21 18:21:41 +03:00
|
|
|
data-state="closed"
|
2023-03-27 11:07:43 +03:00
|
|
|
href="https://matrix.to/#/@user3:example.com"
|
|
|
|
>
|
|
|
|
<div
|
2023-08-24 06:48:35 +03:00
|
|
|
class="mx_Pill_UserIcon mx_BaseAvatar"
|
2023-03-27 11:07:43 +03:00
|
|
|
/>
|
|
|
|
<span
|
|
|
|
class="mx_Pill_text"
|
|
|
|
>
|
|
|
|
@user3:example.com
|
2023-03-13 17:43:13 +03:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 15:06:50 +03:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`<Pill> when rendering a pill for a room should render the expected pill 1`] = `
|
|
|
|
<DocumentFragment>
|
2023-03-13 17:43:13 +03:00
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
|
|
|
class="mx_Pill mx_RoomPill"
|
2023-12-21 18:21:41 +03:00
|
|
|
data-state="closed"
|
2023-03-13 17:43:13 +03:00
|
|
|
href="https://matrix.to/#/!room1:example.com"
|
2023-03-08 15:06:50 +03:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 17:40:03 +03:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2024-02-07 20:26:05 +03:00
|
|
|
data-color="1"
|
2023-08-24 06:48:35 +03:00
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-13 17:43:13 +03:00
|
|
|
role="presentation"
|
2023-08-24 06:48:35 +03:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-08 15:06:50 +03:00
|
|
|
>
|
2023-08-24 06:48:35 +03:00
|
|
|
R
|
2023-03-08 15:06:50 +03:00
|
|
|
</span>
|
2023-03-13 17:43:13 +03:00
|
|
|
<span
|
2023-03-21 12:23:20 +03:00
|
|
|
class="mx_Pill_text"
|
2023-03-13 17:43:13 +03:00
|
|
|
>
|
|
|
|
Room 1
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 15:06:50 +03:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`<Pill> when rendering a pill for a user in the room should render as expected 1`] = `
|
|
|
|
<DocumentFragment>
|
2023-03-13 17:43:13 +03:00
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
|
|
|
class="mx_Pill mx_UserPill"
|
2023-12-21 18:21:41 +03:00
|
|
|
data-state="closed"
|
2023-03-13 17:43:13 +03:00
|
|
|
href="https://matrix.to/#/@user1:example.com"
|
2023-03-08 15:06:50 +03:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 17:40:03 +03:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2023-08-24 06:48:35 +03:00
|
|
|
data-color="4"
|
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-13 17:43:13 +03:00
|
|
|
role="presentation"
|
2023-08-24 06:48:35 +03:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-08 15:06:50 +03:00
|
|
|
>
|
2023-08-24 06:48:35 +03:00
|
|
|
U
|
2023-03-08 15:06:50 +03:00
|
|
|
</span>
|
2023-03-13 17:43:13 +03:00
|
|
|
<span
|
2023-03-21 12:23:20 +03:00
|
|
|
class="mx_Pill_text"
|
2023-03-13 17:43:13 +03:00
|
|
|
>
|
|
|
|
User 1
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 15:06:50 +03:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|