diff --git a/test/unit-tests/components/views/settings/tabs/user/EncryptionUserSettingsTab-test.tsx b/test/unit-tests/components/views/settings/tabs/user/EncryptionUserSettingsTab-test.tsx index 49ce1404216..a1de62a32a4 100644 --- a/test/unit-tests/components/views/settings/tabs/user/EncryptionUserSettingsTab-test.tsx +++ b/test/unit-tests/components/views/settings/tabs/user/EncryptionUserSettingsTab-test.tsx @@ -94,4 +94,19 @@ describe("", () => { await waitFor(() => expect(screen.getByText("Set up recovery")).toBeInTheDocument()); expect(asFragment()).toMatchSnapshot(); }); + + it("should display the reset identity panel when the user clicks on the reset cryptographic identity panel", async () => { + const user = userEvent.setup(); + + const { asFragment } = renderComponent(); + await waitFor(() => { + const button = screen.getByRole("button", { name: "Reset cryptographic identity" }); + expect(button).toBeInTheDocument(); + user.click(button); + }); + await waitFor(() => + expect(screen.getByText("Are you sure you want to reset your identity?")).toBeInTheDocument(), + ); + expect(asFragment()).toMatchSnapshot(); + }); }); diff --git a/test/unit-tests/components/views/settings/tabs/user/__snapshots__/EncryptionUserSettingsTab-test.tsx.snap b/test/unit-tests/components/views/settings/tabs/user/__snapshots__/EncryptionUserSettingsTab-test.tsx.snap index 71ec4deb592..b460b91e512 100644 --- a/test/unit-tests/components/views/settings/tabs/user/__snapshots__/EncryptionUserSettingsTab-test.tsx.snap +++ b/test/unit-tests/components/views/settings/tabs/user/__snapshots__/EncryptionUserSettingsTab-test.tsx.snap @@ -81,6 +81,198 @@ exports[` should display the change recovery key pa `; +exports[` should display the reset identity panel when the user clicks on the reset cryptographic identity panel 1`] = ` + +
+
+ +
+
+
+ + + +
+

+ Are you sure you want to reset your identity? +

+
+
+
    +
  • + + Your account details, contacts, preferences, and chat list will be kept +
  • +
  • + + You will lose any message history that’s stored only on the server +
  • +
  • + + You will need to verify all your existing devices and contacts again +
  • +
+ + Only do this if you believe your account has been compromised. + +
+ +
+
+
+
+`; + exports[` should display the set up recovery key when the user clicks on the set up recovery key button 1`] = `