mirror of
https://github.com/vector-im/element-web.git
synced 2026-01-05 16:41:24 +01:00
Add playwright test & clarify slightly confusing comment
This commit is contained in:
parent
e70afdb04f
commit
40f9bd9480
@ -111,4 +111,19 @@ test.describe("Encryption tab", () => {
|
||||
// The user is prompted to reset their identity
|
||||
await expect(dialog.getByText("Forgot your recovery key? You’ll need to reset your identity.")).toBeVisible();
|
||||
});
|
||||
|
||||
test("should warn before turning off key storage", async ({ page, app, util }) => {
|
||||
await verifySession(app, "new passphrase");
|
||||
await util.openEncryptionTab();
|
||||
|
||||
await page.getByRole("checkbox", { name: "Allow key storage" }).click();
|
||||
|
||||
await expect(
|
||||
page.getByRole("heading", { name: "Are you sure you want to turn off key storage and delete it?" }),
|
||||
).toBeVisible();
|
||||
|
||||
await page.getByRole("button", { name: "Delete key storage" }).click();
|
||||
|
||||
await expect(page.getByRole("checkbox", { name: "Allow key storage" })).not.toBeChecked();
|
||||
});
|
||||
});
|
||||
|
||||
@ -97,7 +97,7 @@ export function useKeyStoragePanelViewModel(): KeyStoragePanelState {
|
||||
|
||||
// finally, set a flag to say that the user doesn't want key backup.
|
||||
// Element X uses this to determine whether to set up automatically,
|
||||
// so this will prevent EX from turning it back on.
|
||||
// so this will stop EX turning it back on spontaneously.
|
||||
await matrixClient.setAccountData("m.org.matrix.custom.backup_disabled", { disabled: true });
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user