mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-01-29 08:58:07 -05:00
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 <ntindle@users.noreply.github.com>
This commit is contained in:
@@ -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,
|
||||
),
|
||||
|
||||
@@ -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 },
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user