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

Add a snapshot for RoomHeaderButtons #10807

Merged
merged 1 commit into from
May 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ describe("RoomHeaderButtons-test.tsx", function () {
return container.querySelector(".mx_RightPanel_threadsButton .mx_Indicator")!.className.includes(type);
}

it("should render", () => {
const { asFragment } = getComponent(room);
expect(asFragment()).toMatchSnapshot();
});

it("shows the thread button", () => {
const { container } = getComponent(room);
expect(getThreadButton(container)).not.toBeNull();
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`RoomHeaderButtons-test.tsx should render 1`] = `
<DocumentFragment>
<div
aria-current="false"
aria-label="Chat"
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_timelineCardButton"
role="button"
tabindex="0"
/>
<div
aria-current="false"
aria-label="Threads"
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_threadsButton"
data-testid="threadsButton"
role="button"
tabindex="0"
/>
<div
aria-current="false"
aria-label="Notifications"
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_notifsButton"
role="button"
tabindex="0"
/>
<div
aria-current="false"
aria-label="Room info"
class="mx_AccessibleButton mx_RightPanel_headerButton mx_RightPanel_roomSummaryButton"
role="button"
tabindex="0"
/>
</DocumentFragment>
`;