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>
34 lines
1.5 KiB
JavaScript
34 lines
1.5 KiB
JavaScript
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.substring(0,200)));
|
|
page.on('console', m => { if (m.type()==='error') errors.push('CON:'+m.text().substring(0,150)); });
|
|
await page.goto('http://localhost/geograsim/App/sims/busfahrt/game.html');
|
|
await page.waitForTimeout(2500);
|
|
const info = await page.evaluate(() => ({
|
|
libLoaded: typeof window.GgsQuickIntro === 'object',
|
|
convReg: typeof window.GGS_TUTORIAL === 'object',
|
|
simId: window.GGS_TUTORIAL && window.GGS_TUTORIAL.simId,
|
|
title: window.GGS_TUTORIAL && window.GGS_TUTORIAL.title,
|
|
btnInDom: !!document.getElementById('btn-info'),
|
|
modalOpen: !!document.querySelector('.ggs-qi-back'),
|
|
}));
|
|
console.log('busfahrt:', JSON.stringify(info, null, 2));
|
|
// Wenn Modal offen: schließen via Klick auf Button
|
|
if (info.modalOpen) {
|
|
await page.click('.ggs-qi-btn-primary');
|
|
await page.waitForTimeout(200);
|
|
const after = await page.evaluate(() => !!document.querySelector('.ggs-qi-back'));
|
|
console.log('after close:', after);
|
|
}
|
|
// Wieder öffnen via GGS_TUTORIAL.replay
|
|
await page.evaluate(() => window.GGS_TUTORIAL.replay());
|
|
await page.waitForTimeout(200);
|
|
const reopen = await page.evaluate(() => !!document.querySelector('.ggs-qi-back'));
|
|
console.log('after replay:', reopen);
|
|
if (errors.length) console.log('errors:', errors.slice(0,5));
|
|
await browser.close();
|
|
})();
|