From b20579d7964e0ef6a3244dbdec0ebcfc8a5070a4 Mon Sep 17 00:00:00 2001 From: Florian Duros Date: Mon, 23 Dec 2024 16:56:25 +0100 Subject: [PATCH] Improve e2e doc --- playwright/e2e/crypto/utils.ts | 4 ++-- playwright/e2e/settings/encryption-user-tab/recovery.spec.ts | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/playwright/e2e/crypto/utils.ts b/playwright/e2e/crypto/utils.ts index 2dccfe032e..1cf1484fd0 100644 --- a/playwright/e2e/crypto/utils.ts +++ b/playwright/e2e/crypto/utils.ts @@ -24,11 +24,11 @@ import { ElementAppPage } from "../../pages/ElementAppPage"; import { Bot } from "../../pages/bot"; /** - * Create a bot and wait for it to be ready to use. + * Create a new device for the Alice user. + * This function will wait for the key backup to be ready. * @param page - the page to use * @param homeserver - the homeserver to use * @param credentials - the credentials to use for the bot client - * @param ignoreSecretStorage - whether to ignore secret storage setup */ export async function createBot( page: Page, diff --git a/playwright/e2e/settings/encryption-user-tab/recovery.spec.ts b/playwright/e2e/settings/encryption-user-tab/recovery.spec.ts index f46ca1b5e1..01e0709d43 100644 --- a/playwright/e2e/settings/encryption-user-tab/recovery.spec.ts +++ b/playwright/e2e/settings/encryption-user-tab/recovery.spec.ts @@ -5,7 +5,6 @@ * Please see LICENSE files in the repository root for full details. */ -// import { test, expect } from "."; import { GeneratedSecretStorageKey } from "matrix-js-sdk/src/crypto-api"; import { test, expect } from "."; @@ -33,7 +32,7 @@ test.describe("Recovery section in Encryption tab", () => { test("should verify the device", { tag: "@screenshot" }, async ({ page, app, util }) => { const dialog = await util.openEncryptionTab(); - // The user can only verify the device + // The user's device is in an unverified state, therefore the only option available to them here is to verify it const verifyButton = dialog.getByRole("button", { name: "Verify this device" }); await expect(verifyButton).toBeVisible(); await expect(util.getEncryptionTabContent()).toMatchScreenshot("verify-device-encryption-tab.png");