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:
parent
b8d0e07fd2
commit
326d026794
1 changed files with 2 additions and 2 deletions
|
|
@ -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 });
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue