diff --git a/test/components/views/right_panel/UserInfo-test.tsx b/test/components/views/right_panel/UserInfo-test.tsx
index cd7eeb3b434..8e8b0e271a9 100644
--- a/test/components/views/right_panel/UserInfo-test.tsx
+++ b/test/components/views/right_panel/UserInfo-test.tsx
@@ -488,6 +488,21 @@ describe("", () => {
expect(mockVerifyDevice).toHaveBeenCalledTimes(1);
expect(mockVerifyDevice).toHaveBeenCalledWith(defaultUser, device);
});
+
+ it("with display name", async () => {
+ const { container } = renderComponent();
+ await act(flushPromises);
+
+ expect(container).toMatchSnapshot();
+ });
+
+ it("without display name", async () => {
+ const device = { deviceId: "deviceId" } as Device;
+ const { container } = renderComponent({ device, userId: defaultUserId });
+ await act(flushPromises);
+
+ expect(container).toMatchSnapshot();
+ });
});
describe("", () => {
diff --git a/test/components/views/right_panel/__snapshots__/UserInfo-test.tsx.snap b/test/components/views/right_panel/__snapshots__/UserInfo-test.tsx.snap
new file mode 100644
index 00000000000..99939ae617f
--- /dev/null
+++ b/test/components/views/right_panel/__snapshots__/UserInfo-test.tsx.snap
@@ -0,0 +1,47 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[` with display name 1`] = `
+
+`;
+
+exports[` without display name 1`] = `
+
+`;