diff --git a/app/e2e/signup.spec.ts b/app/e2e/signup.spec.ts index ab90d70bb..8c95d7d3f 100644 --- a/app/e2e/signup.spec.ts +++ b/app/e2e/signup.spec.ts @@ -2,7 +2,7 @@ import { test, expect, type Page } from "@playwright/test"; import { randomUUID } from "node:crypto"; async function expectText(page: Page, text: string) { - await expect(page.getByText(text)).toBeVisible(); + await expect(page.getByText(text).first()).toBeVisible(); } test.beforeEach(async ({ page }) => { @@ -63,7 +63,6 @@ test.describe("Signup", () => { await expectText(page, "Minimum length"); await expectText(page, "Invalid invite code"); await expectText(page, "Please accept the terms"); - await expectText(page, "Passwords don't match"); }); test("should require matching passwords", async ({ page }) => { @@ -74,10 +73,13 @@ test.describe("Signup", () => { await page.getByPlaceholder("Your full name").fill("Test Account"); await page .getByPlaceholder("e.g. youremail@domain.com") - .fill("testopenearthorg"); + .fill("e2e-test-fail@example.com"); await page.getByLabel("Password", { exact: true }).fill("Password1"); await page.getByLabel("Confirm Password").fill("Password2"); await page.getByPlaceholder("Enter the code you received").fill("123456"); + await page + .locator('input[name="acceptTerms"] + .chakra-checkbox__control') + .click(); await page.getByRole("button", { name: "Create Account" }).click(); await expect(page).toHaveURL(`/en/auth/signup`);