Add a snapshot for RoomHeaderButtons (#10807)
parent
87e2274ae7
commit
70b67fca77
|
@ -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();
|
||||
|
|
|
@ -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>
|
||||
`;
|
Loading…
Reference in New Issue