-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add playwright test for key backup by default
- Loading branch information
Showing
1 changed file
with
16 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,9 @@ Please see LICENSE files in the repository root for full details. | |
import { type Page } from "@playwright/test"; | ||
|
||
import { test, expect } from "../../element-web-test"; | ||
import { test as masTest } from "../oidc"; | ||
import { registerAccountMas } from "../oidc"; | ||
import { isDendrite } from "../../plugins/homeserver/dendrite"; | ||
|
||
async function expectBackupVersionToBe(page: Page, version: string) { | ||
await expect(page.locator(".mx_SecureBackupPanel_statusList tr:nth-child(5) td")).toHaveText( | ||
|
@@ -18,6 +21,19 @@ async function expectBackupVersionToBe(page: Page, version: string) { | |
await expect(page.locator(".mx_SecureBackupPanel_statusList tr:nth-child(6) td")).toHaveText(version); | ||
} | ||
|
||
masTest.describe("Key backup is enabled by default after registration", () => { | ||
masTest.skip(isDendrite, "does not yet support MAS"); | ||
|
||
masTest("Key backup is enabled by default after registration", async ({ page, mailhog, app }) => { | ||
await page.goto("/#/login"); | ||
await page.getByRole("button", { name: "Continue" }).click(); | ||
await registerAccountMas(page, mailhog.api, "alice", "[email protected]", "Pa$sW0rD!"); | ||
|
||
await app.settings.openUserSettings("Security & Privacy"); | ||
expect(page.getByText("This session is backing up your keys.")).toBeVisible(); | ||
}); | ||
}); | ||
|
||
test.describe("Backups", () => { | ||
test.use({ | ||
displayName: "Hanako", | ||
|