Startseite: die DogTag-Marke zum Anfassen (Kette, Ring bis Mitternacht, grosses Ziel fuers Handy)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -134,10 +134,20 @@ for (const [lagename, b, h] of [["Rechner", 1400, 900], ["Handy", 360, 780]]) {
|
||||
const stoert = [...z.closest(".kachel").querySelectorAll(".kachel__name, .kachel__unter, .kachel__titel, h2, h3, .kachel__leute")]
|
||||
.filter((e) => { const q = e.getBoundingClientRect(); return q.width > 2 && !(r.right <= q.left || r.left >= q.right || r.bottom <= q.top || r.top >= q.bottom); })
|
||||
.map((e) => e.className);
|
||||
return { text: z.textContent, href: z.getAttribute("href"), drin: r.left >= kachel.left && r.right <= kachel.right && r.top >= kachel.top && r.bottom <= kachel.bottom, stoert };
|
||||
const ring = z.querySelector(".kdt-ring__fuell");
|
||||
return { text: z.textContent, href: z.getAttribute("href"), drin: r.left >= kachel.left && r.right <= kachel.right && r.top >= kachel.top && r.bottom <= kachel.bottom, stoert,
|
||||
h: Math.round(r.height), w: Math.round(r.width), ring: !!ring && getComputedStyle(ring).strokeDashoffset === "0px",
|
||||
marke: !!z.querySelector(".kdt-marke svg.dogtag-marke"), titel: z.querySelector(".kdt-titel")?.textContent || "" };
|
||||
});
|
||||
ok(da && !!m && /DogTag liegt bereit/.test(m.text) && m.href === "dogtags.html", `${lagename}: „${m?.text}“ in der Reaction-Kachel, führt zur Seite`);
|
||||
ok(da && !!m && /DogTag liegt bereit/.test(m.text) && /Jetzt heulen · 25 Nächte halten/.test(m.text) && m.href === "dogtags.html", `${lagename}: „${m?.text}“ in der Reaction-Kachel, führt zur Seite`);
|
||||
ok(!!m && m.drin && m.stoert.length === 0, `${lagename}: ganz in der Kachel, über keinem Text (${m?.stoert.join(",") || "frei"})`);
|
||||
ok(!!m && m.h >= 56 && m.marke && m.ring && m.titel === "Dein DogTag liegt bereit",
|
||||
`${lagename}: die Marke zum Anfassen — ${m?.w}×${m?.h} Punkte, Marke im vollen Ring, „${m?.titel}“`);
|
||||
await s.seite.waitForTimeout(3200);
|
||||
/* Den Willkommensdialog der Testperson wegklicken, damit das Foto die
|
||||
Kachel zeigt und nicht ihn. */
|
||||
await s.seite.evaluate(() => [...document.querySelectorAll("button")].find((b) => b.textContent.trim() === "Später")?.click());
|
||||
await s.seite.waitForTimeout(600);
|
||||
await s.seite.locator(".kachel[data-sendung='ja']").screenshot({ path: join(HIER, `pruef-dogtag-seite-kachel-${lagename}.png`) }).catch(() => {});
|
||||
ok(s.konsole.length === 0, `${lagename}: keine Fehler in der Konsole (${s.konsole.join(" | ") || "keine"})`);
|
||||
await s.kontext.close();
|
||||
|
||||
Reference in New Issue
Block a user