mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 14:25:02 +00:00
- codegen: Low-code React app with JSON-driven component system - packagerepo: Schema-driven package repository with backend/frontend - postgres: Next.js app with Drizzle ORM and PostgreSQL Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
1.1 KiB
TypeScript
42 lines
1.1 KiB
TypeScript
import { test } from '@playwright/test'
|
|
|
|
test('debug page load', async ({ page }) => {
|
|
const errors: string[] = []
|
|
const pageErrors: Error[] = []
|
|
|
|
page.on('console', (msg) => {
|
|
if (msg.type() === 'error') {
|
|
errors.push(msg.text())
|
|
}
|
|
})
|
|
|
|
page.on('pageerror', (error) => {
|
|
pageErrors.push(error)
|
|
})
|
|
|
|
await page.goto('/', { waitUntil: 'networkidle', timeout: 15000 })
|
|
|
|
// Wait a bit
|
|
await page.waitForTimeout(2000)
|
|
|
|
// Get page content
|
|
const rootHTML = await page.locator('#root').innerHTML().catch(() => 'ERROR GETTING ROOT')
|
|
|
|
console.log('=== PAGE ERRORS ===')
|
|
pageErrors.forEach(err => console.log(err.message))
|
|
|
|
console.log('\n=== CONSOLE ERRORS ===')
|
|
errors.forEach(err => console.log(err))
|
|
|
|
console.log('\n=== ROOT CONTENT ===')
|
|
console.log(rootHTML.substring(0, 500))
|
|
|
|
console.log('\n=== ROOT VISIBLE ===')
|
|
const rootVisible = await page.locator('#root').isVisible().catch(() => false)
|
|
console.log('Root visible:', rootVisible)
|
|
|
|
console.log('\n=== ROOT HAS CHILDREN ===')
|
|
const childCount = await page.locator('#root > *').count()
|
|
console.log('Child count:', childCount)
|
|
})
|