Remove upgrade encryption in DeviceListener and SetupEncryptionToast (#28299)

* Remove upgrade encryption in `DeviceListener` and `SetupEncryptionToast`

* Update comments to `2 different toasts`
This commit is contained in:
Florian Duros 2024-10-29 13:28:41 +01:00 committed by GitHub
parent 79c956388f
commit e5b55db1db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 25 deletions

View file

@ -351,13 +351,13 @@ describe("DeviceListener", () => {
mockCrypto!.getCrossSigningKeyId.mockResolvedValue("abc");
});
it("shows upgrade encryption toast when user has a key backup available", async () => {
it("shows set up encryption toast when user has a key backup available", async () => {
// non falsy response
mockClient!.getKeyBackupVersion.mockResolvedValue({} as unknown as KeyBackupInfo);
await createAndStart();
expect(SetupEncryptionToast.showToast).toHaveBeenCalledWith(
SetupEncryptionToast.Kind.UPGRADE_ENCRYPTION,
SetupEncryptionToast.Kind.SET_UP_ENCRYPTION,
);
});
});