From 70b67fca77f6c01b7025bfad7d999cf5d22216f9 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Fri, 12 May 2023 19:49:07 +0000 Subject: [PATCH] Add a snapshot for RoomHeaderButtons (#10807) --- .../right_panel/RoomHeaderButtons-test.tsx | 5 +++ .../RoomHeaderButtons-test.tsx.snap | 35 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 test/components/views/right_panel/__snapshots__/RoomHeaderButtons-test.tsx.snap diff --git a/test/components/views/right_panel/RoomHeaderButtons-test.tsx b/test/components/views/right_panel/RoomHeaderButtons-test.tsx index a7f932b22d..fa9f19e861 100644 --- a/test/components/views/right_panel/RoomHeaderButtons-test.tsx +++ b/test/components/views/right_panel/RoomHeaderButtons-test.tsx @@ -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(); diff --git a/test/components/views/right_panel/__snapshots__/RoomHeaderButtons-test.tsx.snap b/test/components/views/right_panel/__snapshots__/RoomHeaderButtons-test.tsx.snap new file mode 100644 index 0000000000..ed5acd4886 --- /dev/null +++ b/test/components/views/right_panel/__snapshots__/RoomHeaderButtons-test.tsx.snap @@ -0,0 +1,35 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`RoomHeaderButtons-test.tsx should render 1`] = ` + +
+
+
+
+ +`;