2021-12-09 18:48:58 +08:00
// Jest Snapshot v1, https://goo.gl/fbAQLP
2023-08-07 14:27:09 +08:00
exports[`<RoomPreviewBar /> message case AskToJoin renders the corresponding actions 1`] = `
<div
class="mx_RoomPreviewBar_actions mx_RoomPreviewBar_fullWidth"
>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary"
role="button"
tabindex="0"
>
Request access
</div>
</div>
`;
exports[`<RoomPreviewBar /> message case AskToJoin renders the corresponding message 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
Ask to join RoomPreviewBar-test-room?
</h3>
<p>
<span
2023-08-25 01:12:28 +08:00
class="_avatar_2lhia_17 mx_BaseAvatar _avatar-imageless_2lhia_56"
2023-08-24 11:48:35 +08:00
data-color="4"
data-testid="avatar-img"
data-type="round"
2023-08-07 14:27:09 +08:00
role="presentation"
2023-08-24 11:48:35 +08:00
style="--cpd-avatar-size: 36px;"
2023-08-30 19:47:35 +08:00
title=""
2023-08-07 14:27:09 +08:00
>
2023-08-24 11:48:35 +08:00
R
2023-08-07 14:27:09 +08:00
</span>
</p>
<p>
You need to be granted access to this room in order to view or participate in the conversation. You can send a request to join below.
</p>
</div>
`;
exports[`<RoomPreviewBar /> message case AskToJoin renders the corresponding message with a generic title 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
Ask to join?
</h3>
<p>
<span
2023-08-25 01:12:28 +08:00
class="_avatar_2lhia_17 mx_BaseAvatar _avatar-imageless_2lhia_56"
2023-08-24 11:48:35 +08:00
data-color="1"
data-testid="avatar-img"
data-type="round"
2023-08-07 14:27:09 +08:00
role="presentation"
2023-08-24 11:48:35 +08:00
style="--cpd-avatar-size: 36px;"
2023-08-30 19:47:35 +08:00
title=""
2023-08-07 14:27:09 +08:00
>
2023-08-24 11:48:35 +08:00
?
2023-08-07 14:27:09 +08:00
</span>
</p>
<p>
You need to be granted access to this room in order to view or participate in the conversation. You can send a request to join below.
</p>
</div>
`;
exports[`<RoomPreviewBar /> message case Knocked renders the corresponding actions 1`] = `
<div
class="mx_RoomPreviewBar_actions"
>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_secondary"
role="button"
tabindex="0"
>
Cancel request
</div>
</div>
`;
exports[`<RoomPreviewBar /> message case Knocked renders the corresponding message 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
Request to join sent
</h3>
<p>
<div
class="mx_Icon mx_Icon_16 mx_RoomPreviewBar_icon"
/>
Your request to join is pending.
</p>
</div>
`;
2021-12-09 18:48:58 +08:00
exports[`<RoomPreviewBar /> renders banned message 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
You were banned from RoomPreviewBar-test-room by @kicker:test.com
</h3>
<p>
Reason: test reason
</p>
</div>
`;
exports[`<RoomPreviewBar /> renders kicked message 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
2022-01-14 21:08:34 +08:00
You were removed from RoomPreviewBar-test-room by @kicker:test.com
2021-12-09 18:48:58 +08:00
</h3>
<p>
Reason: test reason
</p>
</div>
`;
exports[`<RoomPreviewBar /> renders viewing room message when room an be previewed 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
You're previewing RoomPreviewBar-test-room. Want to join it?
</h3>
</div>
`;
exports[`<RoomPreviewBar /> renders viewing room message when room can not be previewed 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
RoomPreviewBar-test-room can't be previewed. Do you want to join it?
</h3>
</div>
`;
exports[`<RoomPreviewBar /> with an error renders other errors 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
RoomPreviewBar-test-room is not accessible at this time.
</h3>
<p>
2022-03-29 22:02:12 +08:00
Try again later, or ask a room or space admin to check if you have access.
2021-12-09 18:48:58 +08:00
</p>
<p>
<span>
2022-03-29 22:02:12 +08:00
Something_else was returned while trying to access the room or space. If you think you're seeing this message in error, please
2021-12-09 18:48:58 +08:00
<a
href="https://github.com/vector-im/element-web/issues/new/choose"
rel="noreferrer noopener"
target="_blank"
>
submit a bug report
</a>
.
</span>
</p>
</div>
`;
exports[`<RoomPreviewBar /> with an error renders room not found error 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
RoomPreviewBar-test-room does not exist.
</h3>
<p>
2022-03-29 22:02:12 +08:00
Are you sure you're at the right place?
2021-12-09 18:48:58 +08:00
</p>
</div>
`;
exports[`<RoomPreviewBar /> with an invite with an invited email when client fails to get 3PIDs renders error message 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
Something went wrong with your invite to RoomPreviewBar-test-room
</h3>
<p>
2022-03-29 22:02:12 +08:00
An error (unknown error code) was returned while trying to validate your invite. You could try to pass this information on to the person who invited you.
2021-12-09 18:48:58 +08:00
</p>
</div>
`;
exports[`<RoomPreviewBar /> with an invite with an invited email when client has an identity server connected renders email mismatch message when invite email mxid doesnt match 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
This invite to RoomPreviewBar-test-room was sent to test@test.com
</h3>
<p>
2022-02-22 00:57:44 +08:00
Share this email in Settings to receive invites directly in Element.
2021-12-09 18:48:58 +08:00
</p>
</div>
`;
exports[`<RoomPreviewBar /> with an invite with an invited email when client has an identity server connected renders invite message when invite email mxid match 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
2023-07-04 21:49:27 +08:00
Do you want to join RoomPreviewBar-test-room?
2021-12-09 18:48:58 +08:00
</h3>
<p>
2023-07-04 21:49:27 +08:00
<span
2023-08-25 01:12:28 +08:00
class="_avatar_2lhia_17 mx_BaseAvatar _avatar-imageless_2lhia_56"
2023-08-24 11:48:35 +08:00
data-color="4"
data-testid="avatar-img"
data-type="round"
2023-07-04 21:49:27 +08:00
role="presentation"
2023-08-24 11:48:35 +08:00
style="--cpd-avatar-size: 36px;"
2023-08-30 19:47:35 +08:00
title=""
2023-07-04 21:49:27 +08:00
>
2023-08-24 11:48:35 +08:00
R
2023-07-04 21:49:27 +08:00
</span>
</p>
<p>
<span>
<span
class="mx_RoomPreviewBar_inviter"
>
@inviter:test.com
</span>
invited you
</span>
2021-12-09 18:48:58 +08:00
</p>
</div>
`;
exports[`<RoomPreviewBar /> with an invite with an invited email when client has no identity server connected renders invite message with invited email 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
This invite to RoomPreviewBar-test-room was sent to test@test.com
</h3>
<p>
2022-02-22 00:57:44 +08:00
Use an identity server in Settings to receive invites directly in Element.
2021-12-09 18:48:58 +08:00
</p>
</div>
`;
exports[`<RoomPreviewBar /> with an invite with an invited email when invitedEmail is not associated with current account renders invite message with invited email 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
This invite to RoomPreviewBar-test-room was sent to test@test.com which is not associated with your account
</h3>
<p>
2022-02-22 00:57:44 +08:00
Link this email with your account in Settings to receive invites directly in Element.
2021-12-09 18:48:58 +08:00
</p>
</div>
`;
2023-05-22 07:53:23 +08:00
exports[`<RoomPreviewBar /> with an invite without an invited email for a dm room renders invite message 1`] = `
2021-12-09 18:48:58 +08:00
<div
class="mx_RoomPreviewBar_message"
>
<h3>
2023-05-22 07:53:23 +08:00
Do you want to chat with @inviter:test.com?
2021-12-09 18:48:58 +08:00
</h3>
<p>
<span
2023-08-25 01:12:28 +08:00
class="_avatar_2lhia_17 mx_BaseAvatar _avatar-imageless_2lhia_56"
2023-08-24 11:48:35 +08:00
data-color="4"
data-testid="avatar-img"
data-type="round"
2021-12-09 18:48:58 +08:00
role="presentation"
2023-08-24 11:48:35 +08:00
style="--cpd-avatar-size: 36px;"
2023-08-30 19:47:35 +08:00
title=""
2021-12-09 18:48:58 +08:00
>
2023-08-24 11:48:35 +08:00
R
2021-12-09 18:48:58 +08:00
</span>
</p>
<p>
<span>
<span>
<span
class="mx_RoomPreviewBar_inviter"
>
@inviter:test.com name
</span>
(
@inviter:test.com
)
</span>
2023-05-22 07:53:23 +08:00
wants to chat
2021-12-09 18:48:58 +08:00
</span>
</p>
</div>
`;
exports[`<RoomPreviewBar /> with an invite without an invited email for a dm room renders join and reject action buttons with correct labels 1`] = `
<div
class="mx_RoomPreviewBar_actions"
>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary"
role="button"
tabindex="0"
>
2023-05-22 07:53:23 +08:00
Start chatting
2021-12-09 18:48:58 +08:00
</div>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_secondary"
role="button"
tabindex="0"
>
Reject & Ignore user
</div>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_secondary"
role="button"
tabindex="0"
>
Reject
</div>
</div>
`;
exports[`<RoomPreviewBar /> with an invite without an invited email for a non-dm room renders invite message 1`] = `
<div
class="mx_RoomPreviewBar_message"
>
<h3>
Do you want to join RoomPreviewBar-test-room?
</h3>
<p>
<span
2023-08-25 01:12:28 +08:00
class="_avatar_2lhia_17 mx_BaseAvatar _avatar-imageless_2lhia_56"
2023-08-24 11:48:35 +08:00
data-color="4"
data-testid="avatar-img"
data-type="round"
2021-12-09 18:48:58 +08:00
role="presentation"
2023-08-24 11:48:35 +08:00
style="--cpd-avatar-size: 36px;"
2023-08-30 19:47:35 +08:00
title=""
2021-12-09 18:48:58 +08:00
>
2023-08-24 11:48:35 +08:00
R
2021-12-09 18:48:58 +08:00
</span>
</p>
<p>
<span>
<span>
<span
class="mx_RoomPreviewBar_inviter"
>
@inviter:test.com name
</span>
(
@inviter:test.com
)
</span>
invited you
</span>
</p>
</div>
`;
exports[`<RoomPreviewBar /> with an invite without an invited email for a non-dm room renders join and reject action buttons correctly 1`] = `
<div
class="mx_RoomPreviewBar_actions"
>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary"
role="button"
tabindex="0"
>
Accept
</div>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_secondary"
role="button"
tabindex="0"
>
Reject
</div>
</div>
`;
exports[`<RoomPreviewBar /> with an invite without an invited email for a non-dm room renders join and reject action buttons in reverse order when room can previewed 1`] = `
<div
class="mx_RoomPreviewBar_actions"
>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_secondary"
role="button"
tabindex="0"
>
Reject
</div>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary"
role="button"
tabindex="0"
>
Accept
</div>
</div>
`;
exports[`<RoomPreviewBar /> with an invite without an invited email for a non-dm room renders reject and ignore action buttons when handler is provided 1`] = `
<div
class="mx_RoomPreviewBar_actions"
>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_primary"
role="button"
tabindex="0"
>
Accept
</div>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_secondary"
role="button"
tabindex="0"
>
Reject & Ignore user
</div>
<div
class="mx_AccessibleButton mx_AccessibleButton_hasKind mx_AccessibleButton_kind_secondary"
role="button"
tabindex="0"
>
Reject
</div>
</div>
`;