From efbf61dc0639125a784abeb5597bc85c4183060c Mon Sep 17 00:00:00 2001 From: "claude[bot]" <41898282+claude[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 02:27:39 +0000 Subject: [PATCH] fix(frontend): add URL type annotation to waitForURL callbacks Fixes TypeScript implicit 'any' type error in signup.ts and login.page.ts by adding explicit URL type annotation to the callback parameters. Co-authored-by: Nicholas Tindle --- autogpt_platform/frontend/src/tests/pages/login.page.ts | 2 +- autogpt_platform/frontend/src/tests/utils/signup.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/autogpt_platform/frontend/src/tests/pages/login.page.ts b/autogpt_platform/frontend/src/tests/pages/login.page.ts index e05807ce92..adcb8d908b 100644 --- a/autogpt_platform/frontend/src/tests/pages/login.page.ts +++ b/autogpt_platform/frontend/src/tests/pages/login.page.ts @@ -40,7 +40,7 @@ export class LoginPage { // Wait for redirect to marketplace, onboarding, library, or copilot (new landing pages) const leaveLoginPage = this.page .waitForURL( - (url) => + (url: URL) => /^\/(marketplace|onboarding(\/.*)?|library|copilot)?$/.test( url.pathname, ), diff --git a/autogpt_platform/frontend/src/tests/utils/signup.ts b/autogpt_platform/frontend/src/tests/utils/signup.ts index 6508fe339a..192a9129b9 100644 --- a/autogpt_platform/frontend/src/tests/utils/signup.ts +++ b/autogpt_platform/frontend/src/tests/utils/signup.ts @@ -42,7 +42,7 @@ export async function signupTestUser( // Wait for redirect to onboarding, marketplace, copilot, or library // Use a single waitForURL with a callback to avoid Promise.race race conditions await page.waitForURL( - (url) => + (url: URL) => /\/(onboarding|marketplace|copilot|library)/.test(url.pathname), { timeout: 15000 }, );