Files
geograsim/.dontDeploy/playwright/modul-wk-lehrplan-check.js
T
Adminator fecd8bb9c9 Textsystem: Bis-Strich mit Leerzeichen (Zahl – Zahl) per Agent-Sweep
562 Ersetzungen in 50 Dateien: Halbgeviertstrich zwischen zwei Ziffern (=
"bis"-Bereich) bekommt Leerzeichen davor/danach (3–4 -> 3 – 4). Regex
/([0-9])\s*–\s*(?=[0-9])/ auf Rohtext (format-erhaltend, CRLF/Einrueckung
unveraendert), Bindestriche in Woertern und Minuszeichen unangetastet, alle
JSON weiter gueltig. Energiemanager-Zeitbloecke sind Display-Labels (kein
Logik-Key) -> safe.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 12:38:19 +02:00

18 lines
988 B
JavaScript

const { chromium } = require('@playwright/test');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
const res = await page.goto('http://localhost/geograsim/App/modul-weltkueche');
await page.waitForTimeout(700);
const r = await page.evaluate(() => {
const sec = document.getElementById('lehrplan-bezug');
const komps = [...document.querySelectorAll('.md-kompetenz .md-kompetenz-title')].map(e=>e.textContent.trim());
const anchors = document.querySelectorAll('.md-anchor').length;
const countryChips = [...document.querySelectorAll('.md-lehrplan-filters .md-chip')].map(c=>c.textContent.trim());
const empty = document.body.textContent.includes('Noch keine Kompetenzen zugeordnet');
return { hasSection: !!sec, kompetenzTitles: komps, anchorCount: anchors, countryChips, showsEmpty: empty };
});
console.log(JSON.stringify({ httpStatus: res.status(), result: r }, null, 2));
await browser.close();
})();