fix: waitForPageLoad uses domcontentloaded instead of networkidle
networkidle times out on CMP pages that poll API endpoints. domcontentloaded + 1s wait is sufficient for page rendering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -4,9 +4,11 @@ import { Page, expect } from '@playwright/test'
|
||||
* E2E Test Helpers for SDK Testing
|
||||
*/
|
||||
|
||||
// Wait for page to be fully loaded
|
||||
// Wait for page to be loaded (domcontentloaded — networkidle times out
|
||||
// on pages with polling API calls like CMP dashboard)
|
||||
export async function waitForPageLoad(page: Page) {
|
||||
await page.waitForLoadState('networkidle')
|
||||
await page.waitForLoadState('domcontentloaded')
|
||||
await page.waitForTimeout(1000)
|
||||
}
|
||||
|
||||
// Handle role selection screen if present
|
||||
|
||||
Reference in New Issue
Block a user