Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 70b67fc

Browse files
authored
Add a snapshot for RoomHeaderButtons (#10807)
1 parent 87e2274 commit 70b67fc

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

test/components/views/right_panel/RoomHeaderButtons-test.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ describe("RoomHeaderButtons-test.tsx", function () {
5454
return container.querySelector(".mx_RightPanel_threadsButton .mx_Indicator")!.className.includes(type);
5555
}
5656

57+
it("should render", () => {
58+
const { asFragment } = getComponent(room);
59+
expect(asFragment()).toMatchSnapshot();
60+
});
61+
5762
it("shows the thread button", () => {
5863
const { container } = getComponent(room);
5964
expect(getThreadButton(container)).not.toBeNull();
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Jest Snapshot v1, https://goo.gl/fbAQLP
2+
3+
exports[`RoomHeaderButtons-test.tsx should render 1`] = `
4+
<DocumentFragment>
5+
<div
6+
aria-current="false"
7+
aria-label="Chat"
8+
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_timelineCardButton"
9+
role="button"
10+
tabindex="0"
11+
/>
12+
<div
13+
aria-current="false"
14+
aria-label="Threads"
15+
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_threadsButton"
16+
data-testid="threadsButton"
17+
role="button"
18+
tabindex="0"
19+
/>
20+
<div
21+
aria-current="false"
22+
aria-label="Notifications"
23+
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_notifsButton"
24+
role="button"
25+
tabindex="0"
26+
/>
27+
<div
28+
aria-current="false"
29+
aria-label="Room info"
30+
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_roomSummaryButton"
31+
role="button"
32+
tabindex="0"
33+
/>
34+
</DocumentFragment>
35+
`;

0 commit comments

Comments
 (0)