From 1b0271e912ee5791537f7fcfc66b66a51e2e72df Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 01:08:41 +0000 Subject: [PATCH] fix(frontend): update e2e signup tests to handle new post-signup landing pages After disabling onboarding redirects, users now land on /copilot or /library instead of /onboarding. This updates the test utility to: - Wait for /copilot and /library in addition to /onboarding and /marketplace - Verify authentication on copilot/library pages without requiring marketplace text Co-authored-by: Nicholas Tindle --- .../frontend/src/tests/utils/signup.ts | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/autogpt_platform/frontend/src/tests/utils/signup.ts b/autogpt_platform/frontend/src/tests/utils/signup.ts index 7c8fdbe01b..a4120b9f07 100644 --- a/autogpt_platform/frontend/src/tests/utils/signup.ts +++ b/autogpt_platform/frontend/src/tests/utils/signup.ts @@ -36,13 +36,15 @@ export async function signupTestUser( const signupButton = getButton("Sign up"); await signupButton.click(); - // Wait for successful signup - could redirect to onboarding or marketplace + // Wait for successful signup - could redirect to various pages depending on onboarding state try { - // Wait for either onboarding or marketplace redirect + // Wait for redirect to onboarding, marketplace, copilot, or library await Promise.race([ page.waitForURL(/\/onboarding/, { timeout: 15000 }), page.waitForURL(/\/marketplace/, { timeout: 15000 }), + page.waitForURL(/\/copilot/, { timeout: 15000 }), + page.waitForURL(/\/library/, { timeout: 15000 }), ]); } catch (error) { console.error( @@ -54,14 +56,19 @@ export async function signupTestUser( const currentUrl = page.url(); - // Handle onboarding or marketplace redirect + // Handle onboarding redirect if needed if (currentUrl.includes("/onboarding") && ignoreOnboarding) { await page.goto("http://localhost:3000/marketplace"); await page.waitForLoadState("domcontentloaded", { timeout: 10000 }); } - // Verify we're on the expected final page - if (ignoreOnboarding || currentUrl.includes("/marketplace")) { + // Verify we're on an expected final page and user is authenticated + if (currentUrl.includes("/copilot") || currentUrl.includes("/library")) { + // For copilot/library landing pages, just verify user is authenticated + await page + .getByTestId("profile-popout-menu-trigger") + .waitFor({ state: "visible", timeout: 10000 }); + } else if (ignoreOnboarding || currentUrl.includes("/marketplace")) { // Verify we're on marketplace await page .getByText(