Skip to content
3 changes: 3 additions & 0 deletions e2e/helpers/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import { users } from "@/db/schema";
const TEST_OTP_CODE = "000000";

export const fillOtp = async (page: Page) => {
// Wait for the OTP screen to appear (indicates the email_otp request completed successfully)
await expect(page.getByText("Check your email for a code")).toBeVisible();

// Wait for the OTP input to be visible before filling
const otp = page.getByRole("textbox", { name: "Verification code" });
await expect(otp).toBeVisible();
Expand Down