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:
parent
80656d522c
commit
a3bf9ef4ee
@ -87,8 +87,12 @@ export async function signup(
|
|||||||
name: string,
|
name: string,
|
||||||
testInfo?: TestInfo,
|
testInfo?: TestInfo,
|
||||||
) {
|
) {
|
||||||
await page.goto("/sign-up");
|
await expect(async () => {
|
||||||
await expect(page.getByRole("heading", { name: "Create your EvOo" })).toBeVisible();
|
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");
|
if (testInfo) await captureScreenshot(page, testInfo, "01-sign-up");
|
||||||
await page.getByPlaceholder("Your name").fill(name);
|
await page.getByPlaceholder("Your name").fill(name);
|
||||||
await page.getByPlaceholder("Your email address").fill(email);
|
await page.getByPlaceholder("Your email address").fill(email);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user