From 87bdc784b8d08b72d249eb85a49e8ff17f6994ac Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Fri, 21 Jun 2024 12:21:24 +0100 Subject: [PATCH] Playwright: check the welcome page is loaded and works (#12660) --- playwright/e2e/login/login.spec.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/playwright/e2e/login/login.spec.ts b/playwright/e2e/login/login.spec.ts index 2fab9afaea..b1b02c0a9a 100644 --- a/playwright/e2e/login/login.spec.ts +++ b/playwright/e2e/login/login.spec.ts @@ -31,12 +31,18 @@ test.describe("Login", () => { await homeserver.registerUser(username, password); }); - test("logs in with an existing account and lands on the home screen", async ({ + test("Loads the welcome page by default; then logs in with an existing account and lands on the home screen", async ({ page, homeserver, checkA11y, }) => { - await page.goto("/#/login"); + await page.goto("/"); + + // Should give us the welcome page initially + await expect(page.getByRole("heading", { name: "Welcome to Element!" })).toBeVisible(); + + // Start the login process + await page.getByRole("link", { name: "Sign in" }).click(); // first pick the homeserver, as otherwise the user picker won't be visible await selectHomeserver(page, homeserver.config.baseUrl);