ci(guide): 👷 Add end-to-end diagnostic tests for game guide and update CI/CD agent configuration
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
191de0920a
commit
f58ee4d2b1
3 changed files with 29 additions and 20 deletions
1
.claude/worktrees/agent-aa7c4635
Submodule
1
.claude/worktrees/agent-aa7c4635
Submodule
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 019dde6f917747b4682c65012bb02702028f46c1
|
||||
|
|
@ -2,36 +2,42 @@ import { test, expect } from '@playwright/test'
|
|||
|
||||
const BASE_URL = '/climate/simulation?noGui=true&skip=welcome&totalTurns=50&buffer=0'
|
||||
|
||||
test('diagnose simulation load', async ({ page }) => {
|
||||
test('diagnose simulation - find 404s and worker failures', async ({ page }) => {
|
||||
const messages: string[] = []
|
||||
const errors: string[] = []
|
||||
const networkReqs: string[] = []
|
||||
const notFoundResources: string[] = []
|
||||
|
||||
page.on('console', msg => messages.push(`[${msg.type()}] ${msg.text()}`))
|
||||
page.on('pageerror', err => errors.push(`[pageerror] ${err.message}`))
|
||||
page.on('request', req => {
|
||||
const url = req.url()
|
||||
if (url.includes('worker') || url.includes('wasm') || url.includes('sim-cache') || url.includes('physics')) {
|
||||
networkReqs.push(`REQ ${req.method()} ${url.slice(url.indexOf('/climate') > -1 ? url.indexOf('/climate') : url.length - 80)}`)
|
||||
page.on('console', msg => {
|
||||
const text = msg.text()
|
||||
if (msg.type() === 'error' || text.includes('404') || text.includes('failed') || text.includes('error')) {
|
||||
messages.push(`[page:${msg.type()}] ${text}`)
|
||||
}
|
||||
})
|
||||
page.on('pageerror', err => errors.push(`[pageerror] ${err.message}`))
|
||||
|
||||
page.on('response', res => {
|
||||
const url = res.url()
|
||||
if (url.includes('worker') || url.includes('wasm') || url.includes('sim-cache') || url.includes('physics')) {
|
||||
networkReqs.push(`RES ${res.status()} ${url.slice(Math.max(0, url.length - 80))}`)
|
||||
if (res.status() === 404 || res.status() >= 400) {
|
||||
notFoundResources.push(`${res.status()} ${res.url()}`)
|
||||
}
|
||||
})
|
||||
|
||||
page.on('requestfailed', req => {
|
||||
notFoundResources.push(`FAILED: ${req.url()} — ${req.failure()?.errorText}`)
|
||||
})
|
||||
|
||||
page.on('worker', (worker) => {
|
||||
messages.push(`[WORKER CREATED] ${worker.url()}`)
|
||||
})
|
||||
|
||||
await page.goto(BASE_URL)
|
||||
await page.waitForTimeout(30000)
|
||||
await page.waitForTimeout(15000)
|
||||
|
||||
console.log('=== CONSOLE MESSAGES ===')
|
||||
for (const m of messages.slice(0, 50)) console.log(m)
|
||||
console.log('=== NETWORK ===')
|
||||
for (const r of networkReqs.slice(0, 30)) console.log(r)
|
||||
console.log('=== ERRORS ===')
|
||||
console.log('=== ERROR/RELEVANT CONSOLE MESSAGES ===')
|
||||
for (const m of messages) console.log(m)
|
||||
console.log('=== PAGE ERRORS ===')
|
||||
for (const e of errors) console.log(e)
|
||||
console.log('=== 404 / FAILED RESOURCES ===')
|
||||
for (const r of notFoundResources) console.log(r)
|
||||
|
||||
// Don't assert — just collect info
|
||||
expect(true).toBe(true)
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
{
|
||||
"status": "passed",
|
||||
"failedTests": []
|
||||
"status": "failed",
|
||||
"failedTests": [
|
||||
"620c61f0a0b21e7686ea-28292657752f1295456f"
|
||||
]
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue