2023-11-29 22:46:51 +00:00
|
|
|
/*
|
2024-09-09 14:57:16 +01:00
|
|
|
Copyright 2024 New Vector Ltd.
|
2023-11-29 22:46:51 +00:00
|
|
|
Copyright 2023 The Matrix.org Foundation C.I.C.
|
|
|
|
|
|
2025-01-06 11:18:54 +00:00
|
|
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
2024-09-09 14:57:16 +01:00
|
|
|
Please see LICENSE files in the repository root for full details.
|
2023-11-29 22:46:51 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import { test, expect } from "../../element-web-test";
|
2026-02-25 14:00:25 +01:00
|
|
|
import { createBot, logIntoElement } from "./utils";
|
2025-01-14 18:00:30 +00:00
|
|
|
import { isDendrite } from "../../plugins/homeserver/dendrite";
|
2023-11-29 22:46:51 +00:00
|
|
|
|
|
|
|
|
test.describe("Complete security", () => {
|
2025-01-14 18:00:30 +00:00
|
|
|
test.skip(isDendrite, "Dendrite lacks support for MSC3967 so requires additional auth here");
|
2023-11-29 22:46:51 +00:00
|
|
|
test.use({
|
|
|
|
|
displayName: "Jeff",
|
|
|
|
|
});
|
|
|
|
|
|
2026-02-25 14:00:25 +01:00
|
|
|
test(
|
|
|
|
|
"Complete Security dialog appears correctly",
|
|
|
|
|
{ tag: "@screenshot" },
|
|
|
|
|
async ({ page, credentials, homeserver }) => {
|
|
|
|
|
await createBot(page, homeserver, credentials, true);
|
|
|
|
|
await logIntoElement(page, credentials);
|
|
|
|
|
await expect(page.getByRole("heading", { name: "Confirm your identity" })).toBeVisible();
|
|
|
|
|
await expect(page.getByRole("main")).toMatchScreenshot("complete-security.png");
|
|
|
|
|
},
|
|
|
|
|
);
|
|
|
|
|
|
2023-11-29 22:46:51 +00:00
|
|
|
test("should go straight to the welcome screen if we have no signed device", async ({
|
|
|
|
|
page,
|
|
|
|
|
homeserver,
|
|
|
|
|
credentials,
|
|
|
|
|
}) => {
|
2025-01-07 09:21:07 +00:00
|
|
|
await logIntoElement(page, credentials);
|
2023-11-29 22:46:51 +00:00
|
|
|
await expect(page.getByText("Welcome Jeff", { exact: true })).toBeVisible();
|
|
|
|
|
});
|
|
|
|
|
|
2025-01-07 09:21:07 +00:00
|
|
|
// see also "Verify device during login with SAS" in `verification.spec.ts`.
|
2023-11-29 22:46:51 +00:00
|
|
|
});
|