Playwright test for dehydrated devices with MAS (#34095)

* Device dehydration tests: use common util for recovery setup

We have a utility method for setting up the recovery key, so let's use it.

* Factor out shared method for creating encrypted rooms

* Playwright test for device dehydration

Add a playwright test to check that this stuff actually works.

* Factor out `verifyAfterLogin` as a separate function

* Playwright test for dehydrated devices with MAS
This commit is contained in:
Richard van der Hoff
2026-07-02 13:07:57 +00:00
committed by GitHub
parent f93f68056a
commit 1b9aff2fb1
5 changed files with 98 additions and 13 deletions
@@ -14,9 +14,10 @@ import {
createSecondBotDevice,
createSharedEncryptedRoomWithUser,
enableKeyBackup,
logIntoElementAndVerify,
logIntoElement,
logOutOfElement,
verify,
verifyAfterLogin,
waitForDevices,
} from "./utils";
import { bootstrapCrossSigningForClient } from "../../pages/client.ts";
@@ -170,7 +171,8 @@ test.describe("Cryptography", function () {
window.localStorage.clear();
});
await page.reload();
await logIntoElementAndVerify(page, aliceCredentials, securityKey);
await logIntoElement(page, aliceCredentials);
await verifyAfterLogin(page, securityKey);
/* go back to the test room and find Bob's message again */
await app.viewRoomById(testRoomId);