[105][106] Merge: Fenster/Türen tief einstellbar (Rahmen je Seite, Flügel, Profile, Zargenarten, Schichteinzug je Schicht/Seite, Vorschau) – IDs 103/104→105/106
Claude-Session: https://claude.ai/code/session_01NTYBZBvLYCtugMJoKXaB67
This commit is contained in:
26 files changed
+3099
-85
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { sampleProject } from "../model/sampleProject";
|
||||
import type { Project } from "../model/types";
|
||||
import { openingPreviewProject, openingPreviewSvgs } from "./openingPreview";
|
||||
|
||||
describe("openingPreview ([105]/[106])", () => {
|
||||
it("baut ein Vorschau-Projekt mit nur der Öffnung", () => {
|
||||
const mini = openingPreviewProject(sampleProject, "D1");
|
||||
expect(mini?.walls).toHaveLength(1);
|
||||
expect(mini?.openings?.map((o) => o.id)).toEqual(["D1"]);
|
||||
expect(openingPreviewProject(sampleProject, "fehlt")).toBeNull();
|
||||
});
|
||||
|
||||
it("liefert Grundriss, Schnitt und Ansicht als SVG; Schichteinzug ändert den Grundriss", async () => {
|
||||
const svgs = await openingPreviewSvgs(sampleProject, "D1");
|
||||
expect(svgs?.plan).toContain("<svg");
|
||||
expect(svgs?.section).toContain("<polygon");
|
||||
expect(svgs?.elevation).toContain("<polygon");
|
||||
const withReveal: Project = {
|
||||
...sampleProject,
|
||||
openings: sampleProject.openings!.map((o) => (o.id === "D1" ? { ...o, layerReveals: [{ layer: -1, mode: "zurueck", amount: 0.05 }] } : o)),
|
||||
};
|
||||
const other = await openingPreviewSvgs(withReveal, "D1");
|
||||
expect(other?.plan).not.toEqual(svgs?.plan);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user