Zwischenraum: eigene Vorsilbe bz- statt zr- – die Ziele-Vorschau war verschoben
Der Backstage-Zwischenraum (b44ae093) nutzte die Vorsilbe zr- – dieselbe
wie das Ziele-Formular der Regie (#zr-vorschau, zr-titel). Seine Regeln
(u. a. .zr-vorschau mit Spiegelung) verschoben die Ziele-Vorschau um 15 px;
gefunden von mess-serverziele, am Stand vor meinen Runden gegengemessen.
- 256 Stellen in zwischenraum.js/.css und ihren Prüfungen auf bz- umbenannt;
das Ziele-Formular selbst unverändert.
- Neue Wache in pruef-reaktion (Abschnitt 35): keine Element-Kennung darf
aus zwei Dateien der Saal-Seite kommen – abgeleitet aus reaktion.html und
seinen 46 Skripten; die echte Kollision von heute wird erkannt.
- pruef-reaktion 1104/0, mess-serverziele, zwischenraum-blick, mess-reaktion grün.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -3120,11 +3120,11 @@ console.log("=== Der Vorraum fuer eingeladene Gaeste ===");
|
||||
await zuschauer.seite.waitForTimeout(1500);
|
||||
/* SEIT 04.11.2026 ERST DER BACKSTAGE: Nach „Dabei sein“ steht er nicht
|
||||
vor dem Publikum, sondern sieht seine Prüfung – und die Regie holt ihn. */
|
||||
await zuschauer.seite.waitForSelector("#zr-gast:not([hidden])", { timeout: 8000 }).catch(() => {});
|
||||
await zuschauer.seite.waitForSelector("#bz-gast:not([hidden])", { timeout: 8000 }).catch(() => {});
|
||||
const imBackstage = await zuschauer.seite.evaluate(() => {
|
||||
const f = document.getElementById("zr-gast");
|
||||
const f = document.getElementById("bz-gast");
|
||||
const r = f?.getBoundingClientRect();
|
||||
return { da: !!f && !f.hidden && (r?.height || 0) > 40, schritte: f?.querySelectorAll(".zr-schritt").length || 0 };
|
||||
return { da: !!f && !f.hidden && (r?.height || 0) > 40, schritte: f?.querySelectorAll(".bz-schritt").length || 0 };
|
||||
});
|
||||
const vorHolen = await roh("/workspace/api/reaktion", { keks: k.admin });
|
||||
const schonDrauf = (vorHolen.j?.gaeste || []).some((g) => g.id === IDS.gast);
|
||||
|
||||
@@ -7080,6 +7080,39 @@ melde("=== 34. Chat nachholen ===");
|
||||
ok(/onError: \(e\) => \{/.test(rk) && /\[100, 101, 150\]\.includes\(c\)/.test(rk), "der Player hat einen Fehler-Zuhörer für 100/101/150 (vorher: keiner – das Bild blieb schwarz)");
|
||||
}
|
||||
|
||||
/* =======================================================================
|
||||
35. KEINE KENNUNG IN ZWEI DATEIEN (04.11.2026)
|
||||
|
||||
Gefunden an mir selbst: Der Zwischenraum hieß `zr-…` – dieselbe Vorsilbe
|
||||
wie das Ziele-Formular der Regie (`#zr-vorschau`, `zr-titel`). Seine
|
||||
Stilregeln verschoben die Ziele-Vorschau um 15 px (mess-serverziele rot,
|
||||
live seit b44ae093). Abgeleitet, nicht gepflegt: Jede Kennung, die
|
||||
reaktion.html selbst oder eines SEINER Skripte vergibt, darf nur aus
|
||||
einer Datei kommen.
|
||||
======================================================================= */
|
||||
melde("");
|
||||
melde("=== 35. Keine Kennung in zwei Dateien ===");
|
||||
{
|
||||
const WS = join(HIER, "..", "workspace");
|
||||
const html = readFileSync(join(WS, "reaktion.html"), "utf8");
|
||||
const skripte = [...html.matchAll(/<script src="(assets\/js\/[^"?]+)/g)].map((m) => m[1]);
|
||||
const ohneKommentar = (t) => t.replace(/\/\*[\s\S]*?\*\//g, "").replace(/^\s*\/\/.*$/gm, "").replace(/<!--[\s\S]*?-->/g, "");
|
||||
const vergeben = (text) => new Set([
|
||||
...[...text.matchAll(/\bid="([a-z][\w-]*)"/gi)].map((m) => m[1]),
|
||||
...[...text.matchAll(/\.id\s*=\s*['"]([a-z][\w-]*)['"]/gi)].map((m) => m[1]),
|
||||
]);
|
||||
const wo = new Map();
|
||||
const quellen = [["reaktion.html", ohneKommentar(html)], ...skripte.map((s) => [s.split("/").pop(), (() => { try { return ohneKommentar(readFileSync(join(WS, s), "utf8")); } catch { return ""; } })()])];
|
||||
for (const [name, text] of quellen) for (const id of vergeben(text)) wo.set(id, [...(wo.get(id) || []), name]);
|
||||
const doppelt = [...wo].filter(([, l]) => new Set(l).size > 1);
|
||||
ok(skripte.length >= 30 && wo.size >= 300, `Voraussetzung: ${skripte.length} Skripte und ${wo.size} Kennungen gelesen`);
|
||||
ok(doppelt.length === 0, doppelt.length ? `dieselbe Kennung aus mehreren Dateien: ${doppelt.slice(0, 8).map(([id, l]) => `${id} (${[...new Set(l)].join(", ")})`).join("; ")}` : "keine Kennung wird von zwei Dateien vergeben");
|
||||
/* Gegenprobe: Die Ableitung erkennt eine absichtlich doppelte Kennung. */
|
||||
const probe = new Map();
|
||||
for (const [name, text] of [["a.js", "x.id = 'bz-titel';"], ["b.html", '<p id="bz-titel">']]) for (const id of vergeben(text)) probe.set(id, [...(probe.get(id) || []), name]);
|
||||
ok([...probe].some(([id, l]) => id === "bz-titel" && l.length === 2), "Gegenprobe: eine Kennung aus zwei Dateien wird erkannt");
|
||||
}
|
||||
|
||||
melde(`${geprueft} Pruefungen, ${fehler} Fehler`);
|
||||
melde(fehler === 0 ? "ALLES IN ORDNUNG" : "NICHT IN ORDNUNG");
|
||||
process.exit(fehler === 0 ? 0 : 1);
|
||||
|
||||
@@ -246,25 +246,25 @@ await roh("/workspace/api/reaktion/gast", { method: "POST", keks: k.admin, rumpf
|
||||
await gast.seite.waitForSelector("#vorraum:not([hidden])", { timeout: 15000 });
|
||||
await gast.seite.waitForTimeout(1200);
|
||||
await gast.seite.click("#vorraum-ja");
|
||||
await gast.seite.waitForSelector("#zr-gast:not([hidden])", { timeout: 15000 }).catch(() => {});
|
||||
ok(await sichtbar(gast.seite, "#zr-gast"), "nach „Dabei sein“ steht der Backstage in der Chatspalte");
|
||||
await gast.seite.waitForSelector("#bz-gast:not([hidden])", { timeout: 15000 }).catch(() => {});
|
||||
ok(await sichtbar(gast.seite, "#bz-gast"), "nach „Dabei sein“ steht der Backstage in der Chatspalte");
|
||||
ok(!(await sichtbar(gast.seite, "#vorraum")), "der Einladungsdialog ist zu");
|
||||
/* Warten, bis alle Messungen etwas sagen – höchstens 12 s. */
|
||||
await gast.seite.waitForFunction(() => [...document.querySelectorAll("#zr-gast .zr-schritt")].every((li) => li.dataset.stufe !== "offen"), null, { timeout: 12000 }).catch(() => {});
|
||||
const stufen = await gast.seite.evaluate(() => Object.fromEntries([...document.querySelectorAll("#zr-gast .zr-schritt")].map((li) => [li.dataset.schritt, `${li.dataset.stufe}: ${li.textContent.trim()}`])));
|
||||
await gast.seite.waitForFunction(() => [...document.querySelectorAll("#bz-gast .bz-schritt")].every((li) => li.dataset.stufe !== "offen"), null, { timeout: 12000 }).catch(() => {});
|
||||
const stufen = await gast.seite.evaluate(() => Object.fromEntries([...document.querySelectorAll("#bz-gast .bz-schritt")].map((li) => [li.dataset.schritt, `${li.dataset.stufe}: ${li.textContent.trim()}`])));
|
||||
console.log(" Schritte:", JSON.stringify(stufen, null, 1));
|
||||
ok(Object.keys(stufen).length === 5 && Object.values(stufen).every((s) => !s.startsWith("offen")), "alle fünf Schritte haben eine gemessene Stufe");
|
||||
ok(/^gut/.test(stufen.kamera) && /^(gut|knapp|schwach)/.test(stufen.licht) && /^(gut|knapp|schwach)/.test(stufen.ton) && /Mbit\/s/.test(stufen.leitung),
|
||||
"Kamera an, Licht, Ton und Leitung sind GEMESSEN (mit Zahl), nicht vermutet");
|
||||
const kamera = await gast.seite.evaluate(() => { const v = document.getElementById("zr-vorschau"); return { breite: v?.videoWidth || 0, gleich: v?.srcObject === window.SaalKamera?.strom?.(), live: (v?.srcObject?.getTracks?.() || []).every((t) => t.readyState === "live") }; });
|
||||
const kamera = await gast.seite.evaluate(() => { const v = document.getElementById("bz-vorschau"); return { breite: v?.videoWidth || 0, gleich: v?.srcObject === window.SaalKamera?.strom?.(), live: (v?.srcObject?.getTracks?.() || []).every((t) => t.readyState === "live") }; });
|
||||
ok(kamera.breite > 0 && kamera.gleich && kamera.live, `die Vorschau zeigt DIESELBE Kamera, die später hinausgeht (${kamera.breite} px breit, gleich=${kamera.gleich})`);
|
||||
const lage1 = (await roh("/workspace/api/reaktion", { keks: k.admin })).j;
|
||||
ok(!(lage1?.gaeste || []).some((g) => g.id === IDS.gast), "er steht noch NICHT auf der Bühne");
|
||||
const geometrie = await gast.seite.evaluate(() => {
|
||||
const r = (s) => document.querySelector(s)?.getBoundingClientRect();
|
||||
const zr = r("#zr-gast"), lw = r("#leinwand"), sch = r("#schiene"), liste = r("#chat-liste");
|
||||
const zr = r("#bz-gast"), lw = r("#leinwand"), sch = r("#schiene"), liste = r("#chat-liste");
|
||||
const schnitt = (a, b) => a && b && a.left < b.right && b.left < a.right && a.top < b.bottom && b.top < a.bottom;
|
||||
const klein = [...document.querySelectorAll("#zr-gast *")].filter((e) => e.childNodes.length && [...e.childNodes].some((n) => n.nodeType === 3 && n.textContent.trim()) && parseFloat(getComputedStyle(e).fontSize) < 11.5).map((e) => e.className);
|
||||
const klein = [...document.querySelectorAll("#bz-gast *")].filter((e) => e.childNodes.length && [...e.childNodes].some((n) => n.nodeType === 3 && n.textContent.trim()) && parseFloat(getComputedStyle(e).fontSize) < 11.5).map((e) => e.className);
|
||||
return { ueberVideo: !!schnitt(zr, lw), inSchiene: !!(zr && sch && zr.left >= sch.left - 1 && zr.right <= sch.right + 1), chatHoehe: liste?.height || 0, klein };
|
||||
});
|
||||
ok(!geometrie.ueberVideo && geometrie.inSchiene, "der Backstage liegt in der Chatspalte, nie über dem Video");
|
||||
@@ -293,9 +293,9 @@ const bild = await gast.seite.evaluate(async () => {
|
||||
gesichtNeinHinweis: Z.bildHinweis({ ...basis, gesicht: false }),
|
||||
leitungGut: b({ leitung_kbit: 1600 }).leitung, leitungKnapp: b({ leitung_kbit: 1000 }).leitung, leitungSchwach: b({ leitung_kbit: 400 }).leitung,
|
||||
kann: await Z.gesichtPruefen(),
|
||||
jetzt: document.querySelector('#zr-gast .zr-schritt[data-schritt="kamera"]')?.textContent.trim(),
|
||||
hinweisDa: !document.getElementById("zr-bildhinweis")?.hidden,
|
||||
oval: (() => { const o = document.querySelector("#zr-gast .zr-oval")?.getBoundingClientRect(); const r = document.querySelector("#zr-gast .zr-rahmen")?.getBoundingClientRect();
|
||||
jetzt: document.querySelector('#bz-gast .bz-schritt[data-schritt="kamera"]')?.textContent.trim(),
|
||||
hinweisDa: !document.getElementById("bz-bildhinweis")?.hidden,
|
||||
oval: (() => { const o = document.querySelector("#bz-gast .bz-oval")?.getBoundingClientRect(); const r = document.querySelector("#bz-gast .bz-rahmen")?.getBoundingClientRect();
|
||||
return !!(o && r && o.width > 10 && o.left >= r.left && o.right <= r.right && o.top >= r.top - 1 && o.bottom <= r.bottom + 1); })(),
|
||||
};
|
||||
});
|
||||
@@ -322,7 +322,7 @@ ok(/reicht für dein Kamerabild/.test(bild.leitungGut[1]) && bild.leitungKnapp[0
|
||||
`die Leitung in Worten: „${bild.leitungGut[1]}“`);
|
||||
/* Der Hinweis im Bild wirklich gezeichnet – mit einem Gegenlicht-Bild als Kamera. */
|
||||
const hinweisGezeichnet = await gast.seite.evaluate(async () => {
|
||||
const v = document.getElementById("zr-vorschau");
|
||||
const v = document.getElementById("bz-vorschau");
|
||||
const alt = v.srcObject;
|
||||
const c = document.createElement("canvas"); c.width = 320; c.height = 180;
|
||||
const g = c.getContext("2d");
|
||||
@@ -335,15 +335,15 @@ const hinweisGezeichnet = await gast.seite.evaluate(async () => {
|
||||
const fake = new MediaStream([s.getVideoTracks()[0], ...alt.getAudioTracks()]);
|
||||
window.SaalKamera.strom = () => fake;
|
||||
await new Promise((r) => setTimeout(r, 2600));
|
||||
const h = document.getElementById("zr-bildhinweis");
|
||||
const h = document.getElementById("bz-bildhinweis");
|
||||
const r = h.getBoundingClientRect();
|
||||
const ergebnis = { text: h.textContent, da: !h.hidden && r.height > 0, licht: document.querySelector('#zr-gast .zr-schritt[data-schritt="licht"]')?.textContent.trim() };
|
||||
const ergebnis = { text: h.textContent, da: !h.hidden && r.height > 0, licht: document.querySelector('#bz-gast .bz-schritt[data-schritt="licht"]')?.textContent.trim() };
|
||||
window.SaalKamera.strom = orig;
|
||||
clearInterval(uhr);
|
||||
s.getTracks().forEach((t) => t.stop());
|
||||
void echteSpur;
|
||||
await new Promise((r) => setTimeout(r, 2600));
|
||||
ergebnis.danach = document.getElementById("zr-bildhinweis").hidden;
|
||||
ergebnis.danach = document.getElementById("bz-bildhinweis").hidden;
|
||||
return ergebnis;
|
||||
});
|
||||
console.log(" Hinweis im Bild:", JSON.stringify(hinweisGezeichnet));
|
||||
@@ -356,32 +356,32 @@ ok(!geometrie.klein.length, `keine Schrift unter 11,5 px (${geometrie.klein.join
|
||||
/* Mitschreiber auf der Regieseite: Die Ansage steht nur 6 s da. */
|
||||
await regie.seite.evaluate(() => {
|
||||
window.__ansagen = [];
|
||||
new MutationObserver(() => { const t = document.getElementById("zr-regie-sagt")?.textContent; if (t) window.__ansagen.push(t); })
|
||||
new MutationObserver(() => { const t = document.getElementById("bz-regie-sagt")?.textContent; if (t) window.__ansagen.push(t); })
|
||||
.observe(document.body, { subtree: true, childList: true, characterData: true });
|
||||
});
|
||||
await regie.seite.waitForSelector("#zr-regie:not([hidden]) .zr-warte", { timeout: 15000 }).catch(() => {});
|
||||
await gast.seite.click("#zr-bereit");
|
||||
await gast.seite.waitForFunction(() => document.getElementById("zr-bereit")?.getAttribute("aria-pressed") === "true", null, { timeout: 5000 }).catch(() => {});
|
||||
ok(await gast.seite.evaluate(() => document.getElementById("zr-bereit")?.getAttribute("aria-pressed") === "true"), "„Ich bin bereit“ ist angekommen");
|
||||
await gast.seite.fill("#zr-draht-text", "Bin gleich so weit, Kopfhörer sind drin.");
|
||||
await gast.seite.click("#zr-draht-form button[type=submit]");
|
||||
await regie.seite.waitForSelector("#bz-regie:not([hidden]) .bz-warte", { timeout: 15000 }).catch(() => {});
|
||||
await gast.seite.click("#bz-bereit");
|
||||
await gast.seite.waitForFunction(() => document.getElementById("bz-bereit")?.getAttribute("aria-pressed") === "true", null, { timeout: 5000 }).catch(() => {});
|
||||
ok(await gast.seite.evaluate(() => document.getElementById("bz-bereit")?.getAttribute("aria-pressed") === "true"), "„Ich bin bereit“ ist angekommen");
|
||||
await gast.seite.fill("#bz-draht-text", "Bin gleich so weit, Kopfhörer sind drin.");
|
||||
await gast.seite.click("#bz-draht-form button[type=submit]");
|
||||
await gast.seite.waitForTimeout(800);
|
||||
if (BILDER) await gast.seite.locator("#zr-gast").screenshot({ path: `${BILDER}/zwischenraum-gast-1280.png` });
|
||||
if (BILDER) await gast.seite.locator("#bz-gast").screenshot({ path: `${BILDER}/zwischenraum-gast-1280.png` });
|
||||
if (BILDER) await gast.seite.screenshot({ path: `${BILDER}/zwischenraum-gast-1280-ganz.png` });
|
||||
|
||||
/* ---- Die Regie ---- */
|
||||
await regie.seite.evaluate(() => window.Backstage?.holen?.());
|
||||
await regie.seite.waitForSelector("#zr-regie:not([hidden]) .zr-warte", { timeout: 15000 }).catch(() => {});
|
||||
await regie.seite.waitForFunction(() => document.querySelector(".zr-warte")?.dataset.bereit === "ja"
|
||||
&& [...document.querySelectorAll(".zr-warte .zr-wert")].every((w) => w.dataset.stufe !== "offen"), null, { timeout: 15000 }).catch(() => {});
|
||||
await regie.seite.waitForSelector("#bz-regie:not([hidden]) .bz-warte", { timeout: 15000 }).catch(() => {});
|
||||
await regie.seite.waitForFunction(() => document.querySelector(".bz-warte")?.dataset.bereit === "ja"
|
||||
&& [...document.querySelectorAll(".bz-warte .bz-wert")].every((w) => w.dataset.stufe !== "offen"), null, { timeout: 15000 }).catch(() => {});
|
||||
const karte = await regie.seite.evaluate(() => {
|
||||
const li = document.querySelector(".zr-warte");
|
||||
const li = document.querySelector(".bz-warte");
|
||||
if (!li) return null;
|
||||
const r = li.getBoundingClientRect();
|
||||
return { name: li.querySelector(".zr-warte__name")?.textContent, bereit: li.querySelector(".zr-warte__bereit")?.textContent,
|
||||
werte: [...li.querySelectorAll(".zr-wert")].map((w) => `${w.dataset.stufe}:${w.textContent.trim()}`),
|
||||
draht: li.querySelector(".zr-draht__liste")?.textContent, hoehe: r.height, sichtbar: r.height > 0 && r.width > 0,
|
||||
knopf: li.querySelector(".zr-holen")?.getBoundingClientRect().height || 0 };
|
||||
return { name: li.querySelector(".bz-warte__name")?.textContent, bereit: li.querySelector(".bz-warte__bereit")?.textContent,
|
||||
werte: [...li.querySelectorAll(".bz-wert")].map((w) => `${w.dataset.stufe}:${w.textContent.trim()}`),
|
||||
draht: li.querySelector(".bz-draht__liste")?.textContent, hoehe: r.height, sichtbar: r.height > 0 && r.width > 0,
|
||||
knopf: li.querySelector(".bz-holen")?.getBoundingClientRect().height || 0 };
|
||||
});
|
||||
console.log(" Regie-Karte:", JSON.stringify(karte));
|
||||
const ansage = await regie.seite.evaluate(() => window.__ansagen || []);
|
||||
@@ -394,8 +394,8 @@ ok(/Kopfhörer sind drin/.test(karte?.draht || ""), "und seinem Zuruf");
|
||||
await regie.seite.waitForTimeout(3500);
|
||||
await regie.seite.evaluate(() => window.Backstage?.holen?.());
|
||||
await regie.seite.waitForTimeout(600);
|
||||
const beiGast = await gast.seite.evaluate(() => [...document.querySelectorAll("#zr-gast .zr-schritt")].map((li) => li.dataset.stufe).join(","));
|
||||
const beiRegie = await regie.seite.evaluate(() => [...document.querySelectorAll(".zr-warte .zr-wert")].map((w) => w.dataset.stufe).join(","));
|
||||
const beiGast = await gast.seite.evaluate(() => [...document.querySelectorAll("#bz-gast .bz-schritt")].map((li) => li.dataset.stufe).join(","));
|
||||
const beiRegie = await regie.seite.evaluate(() => [...document.querySelectorAll(".bz-warte .bz-wert")].map((w) => w.dataset.stufe).join(","));
|
||||
ok(beiGast === beiRegie, `die Regie sieht dieselben Stufen wie der Gast (Gast ${beiGast} · Regie ${beiRegie})`);
|
||||
const ecke = await regie.seite.evaluate(() => document.getElementById("cockpit-backstage")?.getBoundingClientRect().toJSON());
|
||||
if (BILDER && ecke) await regie.seite.screenshot({ path: `${BILDER}/zwischenraum-regie-1440.png`, clip: { x: 0, y: Math.max(0, ecke.y - 70), width: 1440, height: Math.min(900 - Math.max(0, ecke.y - 70), ecke.height + 160) } });
|
||||
@@ -404,38 +404,38 @@ const pult = await regie.seite.evaluate(() => {
|
||||
const p = document.getElementById("pult").getBoundingClientRect();
|
||||
const bs = document.getElementById("cockpit-backstage").getBoundingClientRect();
|
||||
const innen = document.getElementById("pult-innen")?.getBoundingClientRect();
|
||||
const kopf = document.querySelector(".zr-warte__kopf").getBoundingClientRect();
|
||||
const holen = document.querySelector(".zr-warte .zr-holen").getBoundingClientRect();
|
||||
const zuletzt = document.querySelector(".zr-warte__zuletzt")?.textContent || "";
|
||||
const kopf = document.querySelector(".bz-warte__kopf").getBoundingClientRect();
|
||||
const holen = document.querySelector(".bz-warte .bz-holen").getBoundingClientRect();
|
||||
const zuletzt = document.querySelector(".bz-warte__zuletzt")?.textContent || "";
|
||||
return { innen: innen?.height || 0, bsUnten: bs.bottom, pultUnten: p.bottom, kopfH: kopf.height, holenDa: holen.height > 0 && holen.bottom <= bs.bottom + 1 && holen.top >= bs.top - 1, zuletzt };
|
||||
});
|
||||
console.log(" Pult:", JSON.stringify(pult));
|
||||
ok(pult.innen >= 100 && pult.bsUnten <= pult.pultUnten + 1, `die Backstage-Zeile bleibt im Pult, der Regie-Inhalt behält Platz (${Math.round(pult.innen)} px, Zeile endet ${Math.round(pult.bsUnten)} ≤ ${Math.round(pult.pultUnten)})`);
|
||||
ok(pult.holenDa && pult.kopfH <= 60, `„Auf die Bühne“ steht zugeklappt in einer Zeile mit Name und Werten (${Math.round(pult.kopfH)} px)`);
|
||||
ok(/Kopfhörer sind drin/.test(pult.zuletzt), "der letzte Zuruf steht auch zugeklappt da");
|
||||
await regie.seite.click(".zr-warte__auf");
|
||||
await regie.seite.click(".bz-warte__auf");
|
||||
await regie.seite.waitForTimeout(300);
|
||||
const auf = await regie.seite.evaluate(() => ({ innen: document.getElementById("pult-innen").getBoundingClientRect().height,
|
||||
bsUnten: document.getElementById("cockpit-backstage").getBoundingClientRect().bottom, pultUnten: document.getElementById("pult").getBoundingClientRect().bottom,
|
||||
rollt: document.getElementById("cockpit-backstage").scrollHeight > document.getElementById("cockpit-backstage").clientHeight }));
|
||||
ok(auf.innen >= 100 && auf.bsUnten <= auf.pultUnten + 1, `aufgeklappt rollt die Zeile in sich, der Regie-Inhalt behält Platz (${Math.round(auf.innen)} px, rollt=${auf.rollt})`);
|
||||
await regie.seite.locator(".zr-warte .zr-draht__feld").scrollIntoViewIfNeeded();
|
||||
await regie.seite.fill(".zr-warte .zr-draht__feld", "Super, in einer Minute holen wir dich.");
|
||||
await regie.seite.click(".zr-warte .zr-draht__form button[type=submit]");
|
||||
await gast.seite.waitForFunction(() => /in einer Minute/.test(document.getElementById("zr-draht")?.textContent || ""), null, { timeout: 8000 }).catch(() => {});
|
||||
ok(await gast.seite.evaluate(() => /in einer Minute/.test(document.getElementById("zr-draht")?.textContent || "")), "der Gast liest die Antwort der Regie ohne Neuladen");
|
||||
await regie.seite.locator(".bz-warte .bz-draht__feld").scrollIntoViewIfNeeded();
|
||||
await regie.seite.fill(".bz-warte .bz-draht__feld", "Super, in einer Minute holen wir dich.");
|
||||
await regie.seite.click(".bz-warte .bz-draht__form button[type=submit]");
|
||||
await gast.seite.waitForFunction(() => /in einer Minute/.test(document.getElementById("bz-draht")?.textContent || ""), null, { timeout: 8000 }).catch(() => {});
|
||||
ok(await gast.seite.evaluate(() => /in einer Minute/.test(document.getElementById("bz-draht")?.textContent || "")), "der Gast liest die Antwort der Regie ohne Neuladen");
|
||||
|
||||
/* ---- Die Regie am Handy (VanVan, 390 × 844) ---- */
|
||||
{
|
||||
const vh = await als("hand", 390, 844);
|
||||
await vh.seite.waitForTimeout(2500); /* die Eröffnungsblende (1,85 s) ist vorbei */
|
||||
await vh.seite.evaluate(() => { const p = document.getElementById("pult"); if (p && p.dataset.auf !== "ja") document.getElementById("pult-griff")?.click(); });
|
||||
await vh.seite.waitForSelector("#zr-regie:not([hidden]) .zr-warte", { timeout: 15000 }).catch(() => {});
|
||||
await vh.seite.locator(".zr-warte .zr-holen").scrollIntoViewIfNeeded().catch(() => {});
|
||||
await vh.seite.waitForSelector("#bz-regie:not([hidden]) .bz-warte", { timeout: 15000 }).catch(() => {});
|
||||
await vh.seite.locator(".bz-warte .bz-holen").scrollIntoViewIfNeeded().catch(() => {});
|
||||
await vh.seite.waitForTimeout(300);
|
||||
const hm = await vh.seite.evaluate(() => {
|
||||
const k = document.querySelector(".zr-warte .zr-holen")?.getBoundingClientRect();
|
||||
const li = document.querySelector(".zr-warte")?.getBoundingClientRect();
|
||||
const k = document.querySelector(".bz-warte .bz-holen")?.getBoundingClientRect();
|
||||
const li = document.querySelector(".bz-warte")?.getBoundingClientRect();
|
||||
return { da: !!(k && k.height > 0), hoehe: k?.height || 0, imFenster: !!(k && k.left >= 0 && k.right <= innerWidth && k.top >= 0 && k.bottom <= innerHeight),
|
||||
karte: li ? Math.round(li.width) : 0, quer: document.documentElement.scrollWidth - innerWidth };
|
||||
});
|
||||
@@ -448,17 +448,17 @@ ok(await gast.seite.evaluate(() => /in einer Minute/.test(document.getElementByI
|
||||
}
|
||||
|
||||
/* ---- Auf die Bühne ---- */
|
||||
await regie.seite.click(".zr-warte .zr-holen");
|
||||
await gast.seite.waitForFunction(() => document.getElementById("zr-gast")?.hidden === true, null, { timeout: 10000 }).catch(() => {});
|
||||
await regie.seite.click(".bz-warte .bz-holen");
|
||||
await gast.seite.waitForFunction(() => document.getElementById("bz-gast")?.hidden === true, null, { timeout: 10000 }).catch(() => {});
|
||||
await gast.seite.waitForTimeout(1500);
|
||||
const danach = await gast.seite.evaluate(() => ({ zu: document.getElementById("zr-gast")?.hidden === true,
|
||||
const danach = await gast.seite.evaluate(() => ({ zu: document.getElementById("bz-gast")?.hidden === true,
|
||||
karte: !!document.getElementById("bs-karte") && !document.getElementById("bs-karte").hidden,
|
||||
kameraLebt: (window.SaalKamera?.strom?.()?.getTracks?.() || []).some((t) => t.readyState === "live") }));
|
||||
const lage2 = (await roh("/workspace/api/reaktion", { keks: k.admin })).j;
|
||||
ok((lage2?.gaeste || []).some((g) => g.id === IDS.gast), "nach „Auf die Bühne“ steht er auf der Bühne");
|
||||
ok(danach.zu && danach.karte, "sein Backstage ist zu, die Bühnenkarte („Regie sieht dich …“) steht da");
|
||||
ok(danach.kameraLebt, "und seine Kamera läuft weiter – sie wird jetzt gebraucht");
|
||||
ok(await regie.seite.evaluate(() => document.getElementById("zr-regie")?.hidden === true), "bei der Regie ist der Backstage leer");
|
||||
ok(await regie.seite.evaluate(() => document.getElementById("bz-regie")?.hidden === true), "bei der Regie ist der Backstage leer");
|
||||
|
||||
/* ---- Handy: Lenny, und dann aus dem Backstage genommen ---- */
|
||||
const handy = await als("gast2", 390, 844);
|
||||
@@ -466,13 +466,13 @@ await roh("/workspace/api/reaktion/gast", { method: "POST", keks: k.admin, rumpf
|
||||
await handy.seite.waitForSelector("#vorraum:not([hidden])", { timeout: 15000 });
|
||||
await handy.seite.waitForTimeout(1200);
|
||||
await handy.seite.tap("#vorraum-ja");
|
||||
await handy.seite.waitForSelector("#zr-gast:not([hidden])", { timeout: 15000 }).catch(() => {});
|
||||
await handy.seite.waitForFunction(() => [...document.querySelectorAll("#zr-gast .zr-schritt")].every((li) => li.dataset.stufe !== "offen"), null, { timeout: 12000 }).catch(() => {});
|
||||
await handy.seite.waitForSelector("#bz-gast:not([hidden])", { timeout: 15000 }).catch(() => {});
|
||||
await handy.seite.waitForFunction(() => [...document.querySelectorAll("#bz-gast .bz-schritt")].every((li) => li.dataset.stufe !== "offen"), null, { timeout: 12000 }).catch(() => {});
|
||||
const hm = await handy.seite.evaluate(() => {
|
||||
const zr = document.getElementById("zr-gast").getBoundingClientRect();
|
||||
const zr = document.getElementById("bz-gast").getBoundingClientRect();
|
||||
const liste = document.getElementById("chat-liste")?.getBoundingClientRect();
|
||||
const knoepfe = [...document.querySelectorAll("#zr-gast button, #zr-gast input")].map((e) => e.getBoundingClientRect().height);
|
||||
const b = document.getElementById("zr-bereit").getBoundingClientRect();
|
||||
const knoepfe = [...document.querySelectorAll("#bz-gast button, #bz-gast input")].map((e) => e.getBoundingClientRect().height);
|
||||
const b = document.getElementById("bz-bereit").getBoundingClientRect();
|
||||
return { hoehe: zr.height, unten: zr.bottom, fenster: innerHeight, chat: liste?.height || 0, kleinsteZiel: Math.min(...knoepfe), breiter: document.documentElement.scrollWidth > innerWidth + 1,
|
||||
bereitSichtbar: b.top >= zr.top && b.bottom <= zr.bottom + 1 && b.bottom <= innerHeight };
|
||||
});
|
||||
@@ -484,9 +484,9 @@ ok(hm.chat >= 100, `am Handy bleibt vom Chat genug stehen (${Math.round(hm.chat)
|
||||
ok(hm.bereitSichtbar, "„Ich bin bereit“ ist am Handy ohne Rollen zu sehen");
|
||||
if (BILDER) await handy.seite.screenshot({ path: `${BILDER}/zwischenraum-handy-390.png` });
|
||||
await roh(`/workspace/api/reaktion/gast/${IDS.gast2}`, { method: "DELETE", keks: k.admin });
|
||||
await handy.seite.waitForFunction(() => document.getElementById("zr-gast")?.hidden === true, null, { timeout: 10000 }).catch(() => {});
|
||||
await handy.seite.waitForFunction(() => document.getElementById("bz-gast")?.hidden === true, null, { timeout: 10000 }).catch(() => {});
|
||||
await handy.seite.waitForTimeout(600);
|
||||
const raus = await handy.seite.evaluate(() => ({ zu: document.getElementById("zr-gast")?.hidden === true, strom: window.SaalKamera?.strom?.() || null }));
|
||||
const raus = await handy.seite.evaluate(() => ({ zu: document.getElementById("bz-gast")?.hidden === true, strom: window.SaalKamera?.strom?.() || null }));
|
||||
ok(raus.zu && raus.strom === null, "aus dem Backstage genommen: Feld zu UND Kamera aus (kein Lämpchen neben einer Seite, die nichts sendet)");
|
||||
|
||||
for (const [wer, s] of [["Regie", regie], ["Gast", gast], ["Handy", handy]]) {
|
||||
|
||||
Reference in New Issue
Block a user