Playwright: check the welcome page is loaded and works (#12660)

t3chguy/dedup-icons-17oct
Richard van der Hoff 2024-06-21 12:21:24 +01:00 committed by GitHub
parent 132669fd28
commit 87bdc784b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 2 deletions

View File

@ -31,12 +31,18 @@ test.describe("Login", () => {
await homeserver.registerUser(username, password); 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, page,
homeserver, homeserver,
checkA11y, 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 // first pick the homeserver, as otherwise the user picker won't be visible
await selectHomeserver(page, homeserver.config.baseUrl); await selectHomeserver(page, homeserver.config.baseUrl);