feat: Beispieluniversum im Seed und Notizen fuer 0.4.0

This commit is contained in:
Florian Wilde
2026-09-01 19:39:35 +02:00
parent 5cf4fc48a6
commit ed6011384a
6 changed files with 185 additions and 3 deletions
+20
View File
@@ -0,0 +1,20 @@
import { chromium } from "playwright";
const [,, SP, ...specs] = process.argv;
const b = await chromium.launch();
const c = await b.newContext({ viewport: { width: 1280, height: 950 }, deviceScaleFactor: 2, colorScheme: "dark" });
const p = await c.newPage();
const errs = [];
p.on("pageerror", e => errs.push(String(e).slice(0,200)));
p.on("console", m => { if (m.type()==="error") errs.push("console: "+m.text().slice(0,160)); });
await p.goto("http://localhost:3011/anmelden");
await p.fill("#email", "demo@flimmer.local");
await p.fill("#password", "flimmer-demo-2026");
await Promise.all([p.waitForURL("http://localhost:3011/"), p.click("button[type=submit]")]);
for (const spec of specs) {
const [name, url, full] = spec.split("|");
await p.goto(`http://localhost:3011${url}`, { waitUntil: "networkidle" });
await p.waitForTimeout(900);
await p.screenshot({ path: `${SP}/${name}.png`, fullPage: full === "full" });
}
console.log("Fehler:", errs.length ? errs.slice(0,4) : "keine");
await b.close();