diff --git a/src/components/ProblemSection.tsx b/src/components/ProblemSection.tsx index cbde41e..c40c82c 100644 --- a/src/components/ProblemSection.tsx +++ b/src/components/ProblemSection.tsx @@ -58,9 +58,9 @@ const ProblemSection = () => { )} - {/* Hintergrundbild: nur Blitze rechts, auf Handy maximale Breite */} + {/* Hintergrundbild: nur Blitze rechts, auf Handy maximale Breite; nur im Dark Mode (dunkles Bild wäre im hellen ein graues Quadrat) */}
{
)} - {/* Hintergrundbild mittig, auf Handy maximale Breite */} + {/* Hintergrundbild mittig, auf Handy maximale Breite; nur im Dark Mode (dunkles Bild wäre im hellen ein graues Quadrat) */}
{
- {/* Hintergrundbild: auf Handy maximale Breite */} + {/* Hintergrundbild: auf Handy maximale Breite; nur im Dark Mode (dunkles Bild wäre im hellen ein graues Quadrat) */}
{ expect(lies("src/index.css")).toMatch(/section\[id\]\s*\{[^}]*scroll-margin-top:\s*6rem/); }); }); + +describe("A2 Hintergrundbilder nur im dunklen Modus", () => { + const BILDER: { name: string; ui: React.ReactElement; datei: string }[] = [ + { name: "ProblemSection", ui: , datei: "problem_blitz.jpg" }, + { name: "SolutionSection", ui: , datei: "loesung.jpg" }, + { name: "Values", ui: , datei: "backgroud_effect.webp" }, + ]; + + it.each(BILDER)("$name: $datei ist im hellen Modus ausgeblendet und im dunklen sichtbar", ({ ui, datei }) => { + const { container } = zeige(ui); + const bild = container.querySelector(`[style*="${datei}"]`); + expect(bild).not.toBeNull(); + expect(bild).toHaveClass("hidden", "dark:block"); + }); +});