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:
Benjamin Admin
2026-05-10 13:38:35 +02:00
parent 1ca6c77c26
commit 17254789e0
+4 -2
View File
@@ -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