mirror of
https://github.com/vector-im/element-web.git
synced 2025-11-29 06:21:20 +01:00
Fix incorrect test of SetupEncryptionToast (#29888)
This commit is contained in:
parent
74fbd892a1
commit
36d25da288
@ -23,6 +23,7 @@ jest.mock("../../../src/dispatcher/dispatcher", () => ({
|
|||||||
|
|
||||||
describe("SetupEncryptionToast", () => {
|
describe("SetupEncryptionToast", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
jest.resetAllMocks();
|
||||||
render(<ToastContainer />);
|
render(<ToastContainer />);
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -65,7 +66,7 @@ describe("SetupEncryptionToast", () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should open settings to the reset flow when recovering fails clicked", async () => {
|
it("should open settings to the reset flow when recovering fails", async () => {
|
||||||
jest.spyOn(SecurityManager, "accessSecretStorage").mockImplementation(async () => {
|
jest.spyOn(SecurityManager, "accessSecretStorage").mockImplementation(async () => {
|
||||||
throw new Error("Something went wrong while recovering!");
|
throw new Error("Something went wrong while recovering!");
|
||||||
});
|
});
|
||||||
@ -78,7 +79,7 @@ describe("SetupEncryptionToast", () => {
|
|||||||
expect(dis.dispatch).toHaveBeenCalledWith({
|
expect(dis.dispatch).toHaveBeenCalledWith({
|
||||||
action: "view_user_settings",
|
action: "view_user_settings",
|
||||||
initialTabId: "USER_ENCRYPTION_TAB",
|
initialTabId: "USER_ENCRYPTION_TAB",
|
||||||
props: { initialEncryptionState: "reset_identity_forgot" },
|
props: { initialEncryptionState: "reset_identity_sync_failed" },
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user