🐛 Display error message on register form (#6797)

This commit is contained in:
Juanfran 2025-06-27 10:01:54 +02:00 committed by GitHub
parent daca26e54f
commit 24e78e6a10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 70 additions and 2 deletions

View file

@ -0,0 +1,21 @@
import { test, expect } from "@playwright/test";
import { RegisterPage } from "../pages/RegisterPage";
test.beforeEach(async ({ page }) => {
await RegisterPage.initWithLoggedOutUser(page);
await page.goto("/#/auth/register");
});
test.describe("Register form errors", () => {
test("User gets error message when email does not match invitation", async ({ page }) => {
const registerPage = new RegisterPage(page);
await registerPage.setupMismatchedEmailError();
await registerPage.fillRegisterFormInputs("John Doe", "john.doe@example.com", "password123");
await registerPage.clickRegisterButton();
await expect(page.getByText(
"Email does not match the invitation.",
)).toBeVisible();
});
});