mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-04 01:19:41 +00:00
+1
-1
@@ -3,7 +3,7 @@
|
||||
exports[`<VideoRoomChatButton /> renders button with an unread marker when room is unread 1`] = `
|
||||
<button
|
||||
aria-label="Chat"
|
||||
aria-labelledby="floating-ui-6"
|
||||
aria-labelledby="floating-ui-iun36"
|
||||
class="_icon-button_bh2qc_17"
|
||||
data-indicator="default"
|
||||
role="button"
|
||||
|
||||
@@ -166,9 +166,11 @@ describe("RoomKnocksBar", () => {
|
||||
beforeEach(() => jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob]));
|
||||
|
||||
it("renders a heading and a paragraph with name and user ID", () => {
|
||||
getComponent(room);
|
||||
const { container } = getComponent(room);
|
||||
expect(screen.getByRole("heading")).toHaveTextContent("Asking to join");
|
||||
expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name} (${bob.userId})`);
|
||||
expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent(
|
||||
`${bob.name} (${bob.userId})`,
|
||||
);
|
||||
});
|
||||
|
||||
describe("when a knock reason is not provided", () => {
|
||||
@@ -296,24 +298,30 @@ describe("RoomKnocksBar", () => {
|
||||
describe("when knock members count is 2", () => {
|
||||
it("renders a paragraph with two names", () => {
|
||||
jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob, jane]);
|
||||
getComponent(room);
|
||||
expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name} and ${jane.name}`);
|
||||
const { container } = getComponent(room);
|
||||
expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent(
|
||||
`${bob.name} and ${jane.name}`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("when knock members count is 3", () => {
|
||||
it("renders a paragraph with three names", () => {
|
||||
jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob, jane, john]);
|
||||
getComponent(room);
|
||||
expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name}, ${jane.name} and ${john.name}`);
|
||||
const { container } = getComponent(room);
|
||||
expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent(
|
||||
`${bob.name}, ${jane.name} and ${john.name}`,
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("when knock count is greater than 3", () => {
|
||||
it("renders a paragraph with two names and a count", () => {
|
||||
jest.spyOn(room, "getMembersWithMembership").mockReturnValue([bob, jane, john, other]);
|
||||
getComponent(room);
|
||||
expect(screen.getByRole("paragraph")).toHaveTextContent(`${bob.name}, ${jane.name} and 2 others`);
|
||||
const { container } = getComponent(room);
|
||||
expect(container.querySelector(".mx_RoomKnocksBar_paragraph")).toHaveTextContent(
|
||||
`${bob.name}, ${jane.name} and 2 others`,
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ exports[`<PinnedEventTile /> should render pinned event 1`] = `
|
||||
class="mx_PinnedEventTile_top"
|
||||
>
|
||||
<span
|
||||
aria-labelledby="floating-ui-1"
|
||||
aria-labelledby="floating-ui-v83z1"
|
||||
class="mx_PinnedEventTile_sender mx_Username_color2"
|
||||
>
|
||||
@alice:server.org
|
||||
@@ -101,7 +101,7 @@ exports[`<PinnedEventTile /> should render pinned event with thread info 1`] = `
|
||||
class="mx_PinnedEventTile_top"
|
||||
>
|
||||
<span
|
||||
aria-labelledby="floating-ui-6"
|
||||
aria-labelledby="floating-ui-lzzu6"
|
||||
class="mx_PinnedEventTile_sender mx_Username_color2"
|
||||
>
|
||||
@alice:server.org
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
exports[`ReadReceiptGroup <ReadReceiptPerson /> should display a tooltip 1`] = `
|
||||
<div
|
||||
class="_tooltip_1pslb_17"
|
||||
id="floating-ui-6"
|
||||
data-floating-ui-focusable=""
|
||||
id="floating-ui-h0aa6"
|
||||
role="tooltip"
|
||||
style="position: absolute; left: 0px; top: 0px; transform: translate(0px, 0px);"
|
||||
tabindex="-1"
|
||||
@@ -21,7 +22,7 @@ exports[`ReadReceiptGroup <ReadReceiptPerson /> should display a tooltip 1`] = `
|
||||
stroke="none"
|
||||
/>
|
||||
<clippath
|
||||
id="floating-ui-9"
|
||||
id="floating-ui-myn19"
|
||||
>
|
||||
<rect
|
||||
height="10"
|
||||
@@ -32,13 +33,13 @@ exports[`ReadReceiptGroup <ReadReceiptPerson /> should display a tooltip 1`] = `
|
||||
</clippath>
|
||||
</svg>
|
||||
<span
|
||||
id="floating-ui-4"
|
||||
id="floating-ui-jfzo4"
|
||||
>
|
||||
Alice
|
||||
</span>
|
||||
<span
|
||||
class="_caption_1pslb_37 cpd-theme-dark"
|
||||
id="floating-ui-5"
|
||||
id="floating-ui-qc6f5"
|
||||
>
|
||||
@alice:example.org
|
||||
</span>
|
||||
|
||||
@@ -47,7 +47,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
|
||||
style="--mx-flex-display: flex; --mx-flex-direction: row; --mx-flex-align: center; --mx-flex-justify: start; --mx-flex-gap: var(--cpd-space-2x);"
|
||||
>
|
||||
<button
|
||||
aria-labelledby="floating-ui-1180"
|
||||
aria-labelledby="floating-ui-d01t1180"
|
||||
class="_icon-button_bh2qc_17"
|
||||
role="button"
|
||||
style="--cpd-icon-button-size: 32px;"
|
||||
@@ -73,7 +73,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
|
||||
<button
|
||||
aria-disabled="true"
|
||||
aria-label="There's no one here to call"
|
||||
aria-labelledby="floating-ui-1185"
|
||||
aria-labelledby="floating-ui-pz7p1185"
|
||||
class="_icon-button_bh2qc_17"
|
||||
role="button"
|
||||
style="--cpd-icon-button-size: 32px;"
|
||||
@@ -98,7 +98,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
|
||||
</button>
|
||||
<button
|
||||
aria-label="Room info"
|
||||
aria-labelledby="floating-ui-1190"
|
||||
aria-labelledby="floating-ui-m28y1190"
|
||||
class="_icon-button_bh2qc_17"
|
||||
role="button"
|
||||
style="--cpd-icon-button-size: 32px;"
|
||||
@@ -123,7 +123,7 @@ exports[`RoomHeader dm does not show the face pile for DMs 1`] = `
|
||||
</button>
|
||||
<button
|
||||
aria-label="Threads"
|
||||
aria-labelledby="floating-ui-1195"
|
||||
aria-labelledby="floating-ui-fg1o1195"
|
||||
class="_icon-button_bh2qc_17"
|
||||
role="button"
|
||||
style="--cpd-icon-button-size: 32px;"
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ exports[`<ThirdPartyMemberInfo /> should render invite 1`] = `
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
aria-labelledby="floating-ui-1"
|
||||
aria-labelledby="floating-ui-1c881"
|
||||
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
|
||||
data-testid="base-card-close-button"
|
||||
role="button"
|
||||
@@ -93,7 +93,7 @@ exports[`<ThirdPartyMemberInfo /> should render invite when room in not availabl
|
||||
</p>
|
||||
</div>
|
||||
<button
|
||||
aria-labelledby="floating-ui-6"
|
||||
aria-labelledby="floating-ui-thxu6"
|
||||
class="_icon-button_bh2qc_17 _subtle-bg_bh2qc_38"
|
||||
data-testid="base-card-close-button"
|
||||
role="button"
|
||||
|
||||
+10
-10
@@ -6,7 +6,7 @@ exports[`FormattingButtons renders in german 1`] = `
|
||||
class="mx_FormattingButtons"
|
||||
>
|
||||
<button
|
||||
aria-label="Fett"
|
||||
aria-label="composer"
|
||||
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
@@ -25,7 +25,7 @@ exports[`FormattingButtons renders in german 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Kursiv"
|
||||
aria-label="composer"
|
||||
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
@@ -44,7 +44,7 @@ exports[`FormattingButtons renders in german 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Unterstrichen"
|
||||
aria-label="composer"
|
||||
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
@@ -63,7 +63,7 @@ exports[`FormattingButtons renders in german 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Durchgestrichen"
|
||||
aria-label="composer"
|
||||
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
@@ -82,7 +82,7 @@ exports[`FormattingButtons renders in german 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Ungeordnete Liste"
|
||||
aria-label="composer"
|
||||
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
@@ -101,7 +101,7 @@ exports[`FormattingButtons renders in german 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Nummerierte Liste"
|
||||
aria-label="composer"
|
||||
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
@@ -120,7 +120,7 @@ exports[`FormattingButtons renders in german 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Zitieren"
|
||||
aria-label="action"
|
||||
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
@@ -139,7 +139,7 @@ exports[`FormattingButtons renders in german 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Code"
|
||||
aria-label="composer"
|
||||
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
@@ -158,7 +158,7 @@ exports[`FormattingButtons renders in german 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Quelltextblock"
|
||||
aria-label="composer"
|
||||
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
@@ -177,7 +177,7 @@ exports[`FormattingButtons renders in german 1`] = `
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
aria-label="Link"
|
||||
aria-label="composer"
|
||||
class="mx_AccessibleButton mx_FormattingButtons_Button mx_FormattingButtons_Button_hover"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
|
||||
Reference in New Issue
Block a user