Add playwright test & clarify slightly confusing comment

This commit is contained in:
David Baker
2025-02-06 15:37:18 +01:00
parent e70afdb04f
commit 40f9bd9480
2 changed files with 16 additions and 1 deletions

View File

@@ -111,4 +111,19 @@ test.describe("Encryption tab", () => {
// The user is prompted to reset their identity
await expect(dialog.getByText("Forgot your recovery key? Youll 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();
});
});