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,8 +14,8 @@ import {
createSharedEncryptedRoomWithUser,
enableKeyBackup,
logIntoElement,
logIntoElementAndVerify,
logOutOfElement,
verifyAfterLogin,
} from "./utils.ts";
import { type Client } from "../../pages/client.ts";
import { type ElementAppPage } from "../../pages/ElementAppPage.ts";
@@ -151,7 +151,8 @@ test.describe("Dehydration", () => {
});
await test.step("Alice logs back in, and should be able to view Bob's message", async () => {
await logIntoElementAndVerify(page, credentials, recoveryKey);
await logIntoElement(page, credentials);
await verifyAfterLogin(page, recoveryKey);
await app.viewRoomById(testRoomId);
await expect(page.getByText("test encrypted 1")).toBeVisible();
});