From 191de0920a7555f7f6e4a2236e1ea9b1f044c22b Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 1 Apr 2026 06:29:28 -0700 Subject: [PATCH] =?UTF-8?q?test(age-dwarves):=20=E2=9C=85=20Add=20end-to-e?= =?UTF-8?q?nd=20diagnostic=20tests=20and=20refresh=20test=20execution=20me?= =?UTF-8?q?tadata=20for=20Age=20of=20Dwarves=20guide?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- games/age-of-dwarves/guide/e2e/diag.spec.ts | 37 +++++++++++++++++++ .../guide/test-results/.last-run.json | 8 +--- 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 games/age-of-dwarves/guide/e2e/diag.spec.ts diff --git a/games/age-of-dwarves/guide/e2e/diag.spec.ts b/games/age-of-dwarves/guide/e2e/diag.spec.ts new file mode 100644 index 00000000..984439e4 --- /dev/null +++ b/games/age-of-dwarves/guide/e2e/diag.spec.ts @@ -0,0 +1,37 @@ +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 }) => { + const messages: string[] = [] + const errors: string[] = [] + const networkReqs: 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('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))}`) + } + }) + + await page.goto(BASE_URL) + await page.waitForTimeout(30000) + + 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 ===') + for (const e of errors) console.log(e) + + // Don't assert — just collect info + expect(true).toBe(true) +}) diff --git a/games/age-of-dwarves/guide/test-results/.last-run.json b/games/age-of-dwarves/guide/test-results/.last-run.json index f1a1430a..cbcc1fba 100644 --- a/games/age-of-dwarves/guide/test-results/.last-run.json +++ b/games/age-of-dwarves/guide/test-results/.last-run.json @@ -1,8 +1,4 @@ { - "status": "failed", - "failedTests": [ - "620c61f0a0b21e7686ea-7c2dd3ded526a0e2f3a1", - "620c61f0a0b21e7686ea-44fa4f9763aa1dd44e1c", - "620c61f0a0b21e7686ea-d47d81b7a53c851889d4" - ] + "status": "passed", + "failedTests": [] } \ No newline at end of file