fix: networkidle still used in stake.ts login flow (#501)
Replace waitForLoadState('networkidle') in the post-login redirect with
waitForURL('**/app/stake**'). Persistent WebSocket connections prevent
networkidle from ever firing, mirroring the same fix applied to navigate.ts.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1302feef82
commit
962b126e8b
1 changed files with 5 additions and 3 deletions
|
|
@ -35,9 +35,11 @@ async function navigateToStakePage(page: Page): Promise<void> {
|
|||
console.log('[stake] Password prompt detected, entering lobsterDao...');
|
||||
await page.getByLabel('Password').fill('lobsterDao');
|
||||
await page.getByRole('button', { name: 'Login' }).click();
|
||||
// router.push('/') in LoginView → '/' redirects to '/stake' → stake page loads.
|
||||
// Allow extra time for the two-hop client-side navigation to settle in slow CI.
|
||||
await page.waitForLoadState('networkidle', { timeout: 20_000 });
|
||||
// router.push('/') in LoginView → '/' redirects to '/app/stake' → stake page loads.
|
||||
// waitForLoadState('networkidle') is avoided here for the same reason as navigate.ts:
|
||||
// persistent WebSocket connections prevent the network from ever going idle.
|
||||
// Instead, wait for the URL to settle on the stake page as the readiness signal.
|
||||
await page.waitForURL('**/app/stake**', { timeout: 20_000 });
|
||||
console.log('[stake] Authenticated, stake page loading');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue