- apps/api: FastAPI backend with Dockerfile - apps/web: Next.js frontend with Dockerfile - apps/sensor: Signal collection agent - packages: shared packages Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
654 B
TypeScript
32 lines
654 B
TypeScript
/**
|
|
* Debug Error Test
|
|
*/
|
|
|
|
import { test, expect } from '@playwright/test'
|
|
|
|
test('capture console errors', async ({ page }) => {
|
|
const errors: string[] = []
|
|
|
|
page.on('console', msg => {
|
|
if (msg.type() === 'error') {
|
|
errors.push(msg.text())
|
|
}
|
|
})
|
|
|
|
page.on('pageerror', error => {
|
|
errors.push(`Page Error: ${error.message}`)
|
|
})
|
|
|
|
await page.goto('/zh-TW')
|
|
await page.waitForTimeout(3000)
|
|
|
|
await page.screenshot({
|
|
path: 'test-results/debug-error.png',
|
|
fullPage: true,
|
|
})
|
|
|
|
console.log('=== Console Errors ===')
|
|
errors.forEach((e, i) => console.log(`${i + 1}. ${e}`))
|
|
console.log('======================')
|
|
})
|