fix(web): retry sign-up navigation in Playwright helpers

Late-suite specs can miss the sign-up heading when Vite is still
warming on self-hosted runners. Retry goto until the form renders
instead of failing once at the default timeout.

Co-authored-by: cynarAI <cynarAI@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-09-23 22:33:04 +00:00
parent 80656d522c
commit a3bf9ef4ee

View File

@ -87,8 +87,12 @@ export async function signup(
name: string,
testInfo?: TestInfo,
) {
await page.goto("/sign-up");
await expect(page.getByRole("heading", { name: "Create your EvOo" })).toBeVisible();
await expect(async () => {
await page.goto("/sign-up", { waitUntil: "domcontentloaded" });
await expect(page.getByRole("heading", { name: "Create your EvOo" })).toBeVisible({
timeout: 5_000,
});
}).toPass({ timeout: 45_000 });
if (testInfo) await captureScreenshot(page, testInfo, "01-sign-up");
await page.getByPlaceholder("Your name").fill(name);
await page.getByPlaceholder("Your email address").fill(email);