diff --git a/frontend/tests/sign-up.spec.ts b/frontend/tests/sign-up.spec.ts index 2a09e7c935..663020bfc2 100644 --- a/frontend/tests/sign-up.spec.ts +++ b/frontend/tests/sign-up.spec.ts @@ -79,15 +79,16 @@ test("Sign up with existing email", async ({ page }) => { await fillForm(page, fullName, email, password, password) await page.getByRole("button", { name: "Sign Up" }).click() + await expect(page).toHaveURL(/\/login$/) await page.goto("/signup") await fillForm(page, fullName, email, password, password) await page.getByRole("button", { name: "Sign Up" }).click() - await page - .getByText("The user with this email already exists in the system") - .click() + await expect( + page.getByText("The user with this email already exists in the system"), + ).toBeVisible() }) test("Sign up with weak password", async ({ page }) => {