1e51ef7def
- Konzept/, didaktik_geografie/, didaktik_simulation/, v2-modules/, v2-platform/ - 12 code-workspace-Files - STATUS-*.md - viele M/D/R-Änderungen an bereits getrackten Files - .gitignore verstärkt: **/.humaninput/, **/secret_keys.txt Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
35 lines
1.3 KiB
JavaScript
35 lines
1.3 KiB
JavaScript
const { chromium } = require('@playwright/test');
|
|
(async () => {
|
|
const browser = await chromium.launch();
|
|
const sims = [
|
|
'busfahrt',
|
|
'entscheidungstag',
|
|
'eu-werkstatt',
|
|
'fluggesellschaft',
|
|
'logistik',
|
|
'sonnensystem',
|
|
];
|
|
let ok = 0, fail = 0;
|
|
for (const sim of sims) {
|
|
const page = await browser.newPage();
|
|
const errors = [];
|
|
page.on('pageerror', e => errors.push('PE:'+e.message.substring(0,90)));
|
|
page.on('console', m => { if (m.type()==='error') errors.push('CON:'+m.text().substring(0,90)); });
|
|
await page.goto('http://localhost/geograsim/App/sims/' + sim + '/game.html');
|
|
await page.waitForTimeout(1500);
|
|
const info = await page.evaluate(() => ({
|
|
lib: typeof window.GgsQuickIntro === 'object',
|
|
conv: typeof window.GGS_TUTORIAL === 'object',
|
|
simId: window.GGS_TUTORIAL && window.GGS_TUTORIAL.simId,
|
|
auto: !!document.querySelector('.ggs-qi-back'),
|
|
}));
|
|
const pass = info.lib && info.conv && info.simId === sim && info.auto;
|
|
if (pass) ok++; else fail++;
|
|
console.log((pass?'✓':'✗'), sim.padEnd(18), JSON.stringify(info), errors.length ? ' errs:'+errors.slice(0,2).join(';') : '');
|
|
await page.close();
|
|
}
|
|
console.log('\n' + ok + '/' + (ok+fail) + ' GgsQuickIntro funktional');
|
|
await browser.close();
|
|
process.exit(fail ? 1 : 0);
|
|
})();
|