From 0f67ca7fdd4b8c227a8af56488506010157357e8 Mon Sep 17 00:00:00 2001 From: bymyself Date: Tue, 18 Nov 2025 10:58:36 -0800 Subject: [PATCH] fix: Simplify cloud auth wait logic --- browser_tests/globalSetupCloud.ts | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/browser_tests/globalSetupCloud.ts b/browser_tests/globalSetupCloud.ts index 239bf2199b..a00a647518 100644 --- a/browser_tests/globalSetupCloud.ts +++ b/browser_tests/globalSetupCloud.ts @@ -38,14 +38,11 @@ export default async function globalSetupCloud(config: FullConfig) { // Click login button await page.click('button[type="submit"]') - // Wait for redirect to main app (adjust selector as needed) - await page.waitForURL('**/', { timeout: 30000 }) + // Wait for redirect to main app + await page.waitForURL('**/cloud', { timeout: 30000 }) - // Wait for app to be fully loaded - await page.waitForFunction( - () => window['app'] && window['app'].extensionManager, - { timeout: 30000 } - ) + // Wait a bit for auth tokens to be written to localStorage + await page.waitForTimeout(2000) // Ensure .auth directory exists const authDir = path.join(__dirname, '.auth')