2023-03-08 13:06:50 +01:00
|
|
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
|
|
|
2023-03-13 15:43:13 +01:00
|
|
|
exports[`<Pill> should not render a non-permalink 1`] = `
|
|
|
|
<DocumentFragment>
|
|
|
|
<div />
|
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
2023-03-09 12:48:36 +01:00
|
|
|
|
2023-03-08 13:06:50 +01:00
|
|
|
exports[`<Pill> should not render an avatar or link when called with inMessage = false and shouldShowPillAvatar = false 1`] = `
|
|
|
|
<DocumentFragment>
|
2023-03-13 15:43:13 +01:00
|
|
|
<div>
|
|
|
|
<bdi>
|
2023-03-08 13:06:50 +01:00
|
|
|
<span
|
2023-12-21 16:21:41 +01:00
|
|
|
tabindex="0"
|
2023-03-08 13:06:50 +01:00
|
|
|
>
|
2023-03-13 15:43:13 +01:00
|
|
|
<span
|
2023-12-21 16:21:41 +01:00
|
|
|
class="mx_Pill mx_RoomPill"
|
2023-03-13 15:43:13 +01:00
|
|
|
>
|
2023-12-21 16:21:41 +01:00
|
|
|
<span
|
|
|
|
class="mx_Pill_text"
|
|
|
|
>
|
|
|
|
Room 1
|
|
|
|
</span>
|
2023-03-13 15:43:13 +01:00
|
|
|
</span>
|
2023-03-08 13:06:50 +01:00
|
|
|
</span>
|
2023-03-13 15:43:13 +01:00
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 13:06:50 +01:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`<Pill> should render the expected pill for @room 1`] = `
|
|
|
|
<DocumentFragment>
|
2023-03-13 15:43:13 +01:00
|
|
|
<div>
|
|
|
|
<bdi>
|
2023-03-08 13:06:50 +01:00
|
|
|
<span
|
2023-12-21 16:21:41 +01:00
|
|
|
tabindex="0"
|
2023-03-08 13:06:50 +01:00
|
|
|
>
|
|
|
|
<span
|
2023-12-21 16:21:41 +01:00
|
|
|
class="mx_Pill mx_AtRoomPill"
|
2023-03-13 15:43:13 +01:00
|
|
|
>
|
2023-12-21 16:21:41 +01:00
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 15:40:03 +01:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2024-02-07 18:26:05 +01:00
|
|
|
data-color="1"
|
2023-12-21 16:21:41 +01: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 13:06:50 +01:00
|
|
|
</span>
|
|
|
|
</span>
|
2023-03-13 15:43:13 +01:00
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 13:06:50 +01:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
2023-03-27 10:07:43 +02:00
|
|
|
exports[`<Pill> should render the expected pill for a known user not in the room 1`] = `
|
2023-03-21 10:23:20 +01:00
|
|
|
<DocumentFragment>
|
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
2023-03-27 10:07:43 +02:00
|
|
|
class="mx_Pill mx_UserPill"
|
|
|
|
href="https://matrix.to/#/@user2:example.com"
|
2023-03-21 10:23:20 +01:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 15:40:03 +01:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2023-08-24 05:48:35 +02:00
|
|
|
data-color="5"
|
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-21 10:23:20 +01:00
|
|
|
role="presentation"
|
2023-08-24 05:48:35 +02:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-21 10:23:20 +01:00
|
|
|
>
|
2023-08-24 05:48:35 +02:00
|
|
|
U
|
2023-03-21 10:23:20 +01:00
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
class="mx_Pill_text"
|
|
|
|
>
|
2023-03-27 10:07:43 +02:00
|
|
|
User 2
|
2023-03-21 10:23:20 +01:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
2023-03-27 10:07:43 +02:00
|
|
|
exports[`<Pill> should render the expected pill for a message in another room 1`] = `
|
2023-03-21 10:23:20 +01:00
|
|
|
<DocumentFragment>
|
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
|
|
|
class="mx_Pill mx_EventPill"
|
|
|
|
href="https://matrix.to/#/!room1:example.com/$123-456"
|
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 15:40:03 +01:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2024-02-07 18:26:05 +01:00
|
|
|
data-color="1"
|
2023-08-24 05:48:35 +02:00
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-21 10:23:20 +01:00
|
|
|
role="presentation"
|
2023-08-24 05:48:35 +02:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-21 10:23:20 +01:00
|
|
|
>
|
2023-08-24 05:48:35 +02:00
|
|
|
R
|
2023-03-21 10:23:20 +01:00
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
class="mx_Pill_text"
|
|
|
|
>
|
2023-03-27 10:07:43 +02:00
|
|
|
Message in Room 1
|
2023-03-21 10:23:20 +01:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
2023-03-27 10:07:43 +02:00
|
|
|
exports[`<Pill> should render the expected pill for a message in the same room 1`] = `
|
2023-03-08 13:06:50 +01:00
|
|
|
<DocumentFragment>
|
2023-03-13 15:43:13 +01:00
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
2023-03-27 10:07:43 +02:00
|
|
|
class="mx_Pill mx_EventPill"
|
|
|
|
href="https://matrix.to/#/!room1:example.com/$123-456"
|
2023-03-08 13:06:50 +01:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 15:40:03 +01:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2023-08-24 05:48:35 +02:00
|
|
|
data-color="4"
|
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-13 15:43:13 +01:00
|
|
|
role="presentation"
|
2023-08-24 05:48:35 +02:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-08 13:06:50 +01:00
|
|
|
>
|
2023-08-24 05:48:35 +02:00
|
|
|
U
|
2023-03-08 13:06:50 +01:00
|
|
|
</span>
|
2023-03-13 15:43:13 +01:00
|
|
|
<span
|
2023-03-21 10:23:20 +01:00
|
|
|
class="mx_Pill_text"
|
2023-03-13 15:43:13 +01:00
|
|
|
>
|
2023-03-27 10:07:43 +02:00
|
|
|
Message from User 1
|
2023-03-13 15:43:13 +01:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 13:06:50 +01:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
2023-03-27 10:07:43 +02:00
|
|
|
exports[`<Pill> should render the expected pill for a room alias 1`] = `
|
2023-03-09 12:48:36 +01:00
|
|
|
<DocumentFragment>
|
2023-03-13 15:43:13 +01:00
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
|
|
|
class="mx_Pill mx_RoomPill"
|
2023-03-27 10:07:43 +02:00
|
|
|
href="https://matrix.to/#/#room1:example.com"
|
2023-03-09 12:48:36 +01:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 15:40:03 +01:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2024-02-07 18:26:05 +01:00
|
|
|
data-color="1"
|
2023-08-24 05:48:35 +02:00
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-13 15:43:13 +01:00
|
|
|
role="presentation"
|
2023-08-24 05:48:35 +02:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-09 12:48:36 +01:00
|
|
|
>
|
2023-08-24 05:48:35 +02:00
|
|
|
R
|
2023-03-09 12:48:36 +01:00
|
|
|
</span>
|
2023-03-13 15:43:13 +01:00
|
|
|
<span
|
2023-03-21 10:23:20 +01:00
|
|
|
class="mx_Pill_text"
|
2023-03-13 15:43:13 +01:00
|
|
|
>
|
2023-03-27 10:07:43 +02:00
|
|
|
Room 1
|
2023-03-13 15:43:13 +01:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-09 12:48:36 +01:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
2023-03-27 10:07:43 +02:00
|
|
|
exports[`<Pill> should render the expected pill for a space 1`] = `
|
2023-03-08 13:06:50 +01:00
|
|
|
<DocumentFragment>
|
2023-03-13 15:43:13 +01:00
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
2023-03-27 10:07:43 +02:00
|
|
|
class="mx_Pill mx_RoomPill"
|
|
|
|
href="https://matrix.to/#/!space1:example.com"
|
2023-03-08 13:06:50 +01:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 15:40:03 +01:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2023-08-24 05:48:35 +02:00
|
|
|
data-color="2"
|
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-13 15:43:13 +01:00
|
|
|
role="presentation"
|
2023-08-24 05:48:35 +02:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-08 13:06:50 +01:00
|
|
|
>
|
2023-08-24 05:48:35 +02:00
|
|
|
S
|
2023-03-08 13:06:50 +01:00
|
|
|
</span>
|
2023-03-13 15:43:13 +01:00
|
|
|
<span
|
2023-03-21 10:23:20 +01:00
|
|
|
class="mx_Pill_text"
|
2023-03-13 15:43:13 +01:00
|
|
|
>
|
2023-03-27 10:07:43 +02: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"
|
|
|
|
href="https://matrix.to/#/@user3:example.com"
|
|
|
|
>
|
2024-10-18 15:51:54 +02:00
|
|
|
<svg
|
2023-08-24 05:48:35 +02:00
|
|
|
class="mx_Pill_UserIcon mx_BaseAvatar"
|
2024-10-18 15:51:54 +02:00
|
|
|
fill="currentColor"
|
|
|
|
height="1em"
|
|
|
|
viewBox="0 0 24 24"
|
|
|
|
width="1em"
|
|
|
|
xmlns="http://www.w3.org/2000/svg"
|
|
|
|
>
|
|
|
|
<path
|
|
|
|
d="M12 12c-1.1 0-2.042-.392-2.825-1.175C8.392 10.042 8 9.1 8 8s.392-2.042 1.175-2.825C9.958 4.392 10.9 4 12 4s2.042.392 2.825 1.175C15.608 5.958 16 6.9 16 8s-.392 2.042-1.175 2.825C14.042 11.608 13.1 12 12 12Zm-8 6v-.8c0-.567.146-1.087.438-1.563A2.911 2.911 0 0 1 5.6 14.55a14.843 14.843 0 0 1 3.15-1.163A13.76 13.76 0 0 1 12 13c1.1 0 2.183.13 3.25.387 1.067.259 2.117.646 3.15 1.163.483.25.87.612 1.163 1.087.291.476.437.996.437 1.563v.8c0 .55-.196 1.02-.587 1.413A1.926 1.926 0 0 1 18 20H6c-.55 0-1.02-.196-1.412-.587A1.926 1.926 0 0 1 4 18Z"
|
|
|
|
/>
|
|
|
|
</svg>
|
2023-03-27 10:07:43 +02:00
|
|
|
<span
|
|
|
|
class="mx_Pill_text"
|
|
|
|
>
|
|
|
|
@user3:example.com
|
2023-03-13 15:43:13 +01:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 13:06:50 +01:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`<Pill> when rendering a pill for a room should render the expected pill 1`] = `
|
|
|
|
<DocumentFragment>
|
2023-03-13 15:43:13 +01:00
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
|
|
|
class="mx_Pill mx_RoomPill"
|
|
|
|
href="https://matrix.to/#/!room1:example.com"
|
2023-03-08 13:06:50 +01:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 15:40:03 +01:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2024-02-07 18:26:05 +01:00
|
|
|
data-color="1"
|
2023-08-24 05:48:35 +02:00
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-13 15:43:13 +01:00
|
|
|
role="presentation"
|
2023-08-24 05:48:35 +02:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-08 13:06:50 +01:00
|
|
|
>
|
2023-08-24 05:48:35 +02:00
|
|
|
R
|
2023-03-08 13:06:50 +01:00
|
|
|
</span>
|
2023-03-13 15:43:13 +01:00
|
|
|
<span
|
2023-03-21 10:23:20 +01:00
|
|
|
class="mx_Pill_text"
|
2023-03-13 15:43:13 +01:00
|
|
|
>
|
|
|
|
Room 1
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 13:06:50 +01:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|
|
|
|
|
|
|
|
exports[`<Pill> when rendering a pill for a user in the room should render as expected 1`] = `
|
|
|
|
<DocumentFragment>
|
2023-03-13 15:43:13 +01:00
|
|
|
<div>
|
|
|
|
<bdi>
|
|
|
|
<a
|
|
|
|
class="mx_Pill mx_UserPill"
|
|
|
|
href="https://matrix.to/#/@user1:example.com"
|
2023-03-08 13:06:50 +01:00
|
|
|
>
|
|
|
|
<span
|
|
|
|
aria-hidden="true"
|
2024-03-07 15:40:03 +01:00
|
|
|
class="_avatar_mcap2_17 mx_BaseAvatar _avatar-imageless_mcap2_61"
|
2023-08-24 05:48:35 +02:00
|
|
|
data-color="4"
|
|
|
|
data-testid="avatar-img"
|
|
|
|
data-type="round"
|
2023-03-13 15:43:13 +01:00
|
|
|
role="presentation"
|
2023-08-24 05:48:35 +02:00
|
|
|
style="--cpd-avatar-size: 16px;"
|
2023-03-08 13:06:50 +01:00
|
|
|
>
|
2023-08-24 05:48:35 +02:00
|
|
|
U
|
2023-03-08 13:06:50 +01:00
|
|
|
</span>
|
2023-03-13 15:43:13 +01:00
|
|
|
<span
|
2023-03-21 10:23:20 +01:00
|
|
|
class="mx_Pill_text"
|
2023-03-13 15:43:13 +01:00
|
|
|
>
|
|
|
|
User 1
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</bdi>
|
|
|
|
</div>
|
2023-03-08 13:06:50 +01:00
|
|
|
</DocumentFragment>
|
|
|
|
`;
|