const { chromium } = require('@playwright/test'); (async () => { const browser = await chromium.launch(); const page = await browser.newPage(); const errors = []; page.on('pageerror', e => errors.push('PAGEERROR: '+e.message)); page.on('console', m => { if (m.type()==='error') errors.push(m.text()); }); // 1) maps-custom.json direkt prüfen const mc = await page.request.get('http://localhost/geograsim/App/sims/tourismusregion/js/maps-custom.json'); const mcJson = await mc.json(); const ps = mcJson.passstrasse || null; // 2) Hintergrundbild erreichbar? const img = await page.request.get('http://localhost/geograsim/App/sims/tourismusregion/assets/maps/passstrasse.png'); // 3) Sim-Startscreen laden, Kartenliste prüfen const res = await page.goto('http://localhost/geograsim/App/sims/tourismusregion/game.html'); await page.waitForTimeout(2500); const startInfo = await page.evaluate(() => { const list = document.getElementById('mapList'); const labels = list ? [...list.querySelectorAll('*')].map(e=>e.textContent).filter(t=>t && t.length<40) : []; const hasPass = !!(list && /Passstra/i.test(list.textContent||'')); return { mapListText: (list?list.textContent:'').replace(/\s+/g,' ').trim().slice(0,300), hasPass }; }); console.log(JSON.stringify({ httpStatus: res.status(), passInMapsCustom: !!ps, routeKeys: ps ? Object.keys(ps.routes||{}) : null, bergaufPoints: ps && ps.routes && ps.routes.bergauf ? ps.routes.bergauf.length : null, slotCount: ps ? (ps.slots||[]).length : null, bgImageStatus: img.status(), startInfo, pageErrors: errors }, null, 2)); await browser.close(); })();