1
0
mirror of https://github.com/element-hq/element-web.git synced 2025-08-08 03:42:14 +03:00

Add Forgot recovery key? button to encryption tab (#29202)

* feat(crypto settings): add "Forgot  recovery key?" button to encryption tab

* test(crypto settings): add tests for `RecoveryPanelOutOfSync`

* test(crypto settings): update encryption tab test

* test(crypto settings): update and add e2e test
This commit is contained in:
Florian D
2025-02-06 11:54:20 +01:00
committed by GitHub
parent 63a3a6c454
commit 53f83124a0
11 changed files with 273 additions and 95 deletions

View File

@@ -93,4 +93,22 @@ test.describe("Encryption tab", () => {
await checkDeviceIsConnectedKeyBackup(app, expectedBackupVersion, true);
},
);
test("should display the reset identity panel when the user clicks on 'Forgot recovery key?'", async ({
page,
app,
util,
}) => {
await verifySession(app, "new passphrase");
// We need to delete the cached secrets
await deleteCachedSecrets(page);
// The "Key storage is out sync" section is displayed and the user click on the "Forgot recovery key?" button
await util.openEncryptionTab();
const dialog = util.getEncryptionTabContent();
await dialog.getByRole("button", { name: "Forgot recovery key?" }).click();
// The user is prompted to reset their identity
await expect(dialog.getByText("Forgot your recovery key? Youll need to reset your identity.")).toBeVisible();
});
});