[293] Wand-Oberkante als eine Auswahl (Geschosshöhe/Frei, Bis Decke, Bis Dach, tiefere von beiden): Objekt-Info und Befehl wand

This commit is contained in:
Claude committed 2026-11-19 10:49:42 +00:00
1 parent c7f7f66b33
commit c1b4dcf67a
14 files changed
+184 -71

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
import { describe, expect, it } from "vitest";
import { WALL_TOP_MODES, wallTopFromFields, wallTopPatch, wallTopNext } from "./wallTop";
describe("Wand-Oberkante [293]", () => {
it("Felder und Auswahl sind umkehrbar", () => {
for (const m of WALL_TOP_MODES) {
const p = wallTopPatch(m);
expect(wallTopFromFields(p.roofAttach, p.ceilingAttach)).toBe(m);
}
});
it("Standard (nichts gesetzt) = Geschosshöhe", () => {
expect(wallTopFromFields(undefined, undefined)).toBe("storey");
expect(wallTopPatch("storey")).toEqual({ roofAttach: undefined, ceilingAttach: undefined });
});
it("Decke allein schaltet das Dach ab, tiefere lässt es automatisch", () => {
expect(wallTopPatch("ceiling")).toEqual({ roofAttach: false, ceilingAttach: true });
expect(wallTopPatch("lower")).toEqual({ roofAttach: undefined, ceilingAttach: true });
expect(wallTopPatch("roof")).toEqual({ roofAttach: true, ceilingAttach: undefined });
});
it("reihum", () => {
expect(wallTopNext("storey")).toBe("ceiling");
expect(wallTopNext("lower")).toBe("storey");
});
});