Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

✅ Fix race in email login test helper (#2500)

Luke Vella3ee6c214fabb
diff --git a/packages/test-helpers/src/login.ts b/packages/test-helpers/src/login.ts
index a8b3f5331..8fb0eb3e4 100644
--- a/packages/test-helpers/src/login.ts
+++ b/packages/test-helpers/src/login.ts
@@ -16,8 +16,8 @@ export async function loginWithEmail(
await page.getByLabel("Password").fill(password);
await page.getByRole("button", { name: "Login with password" }).click();
} else {
- const code = await getCode(email);
await page.getByRole("heading", { name: "Finish Logging In" }).waitFor();
+ const code = await getCode(email);
await page.getByLabel("Enter your 6-digit code").fill(code);
}