fix: tests/setup/navigate.ts: bare 500ms timeout after pushState is fragile under CPU pressure (#390)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
openhands 2026-03-03 00:20:47 +00:00
parent b8d0e07fd2
commit 326d026794

View file

@ -12,6 +12,6 @@ export async function navigateSPA(page: Page, path: string): Promise<void> {
window.history.pushState({}, '', p);
window.dispatchEvent(new PopStateEvent('popstate'));
}, path);
// Give Vue Router time to resolve the route and render
await page.waitForTimeout(500);
// Wait for Vue Router to actually resolve the route (not a fixed delay)
await page.waitForURL((url) => url.pathname === path, { timeout: 10_000 });
}