[144] e2e: Bemassung folgt, Bogenwand im Erker, Anschlag an der Nachbaröffnung; Klick-Zug 0.5 m (Fang)

This commit is contained in:
Claude committed 2026-11-06 07:46:01 +00:00
1 parent c77a57b9bb
commit b5399c03fd
2 files changed
+75 -14

No files matched your search

+9
View File
@@ -26,6 +26,10 @@ declare global {
openings: () => { id: string; hostWallId: string; position: number }[];
/** [144] Auswahl setzen (wie ein Klick), z. B. `{ openings: ["D1"] }`. */
select: (patch: Record<string, string[]>) => void;
/** [144] Punkte einer Bemassung (Kette) — folgt sie der Öffnung? */
dimPts: (id: string) => { x: number; y: number }[];
/** [144] Texte der Hinweise (Benachrichtigungen). */
notices: () => string[];
};
}
}
@@ -52,6 +56,11 @@ export function installTestHooks(): void {
getState().project.drawings2d.flatMap((d) => (d.id.startsWith(prefix) && d.geom.shape === "polyline" ? [{ id: d.id, pts: d.geom.pts }] : [])),
openings: () => (getState().project.openings ?? []).map((o) => ({ id: o.id, hostWallId: o.hostWallId, position: o.position })),
select: (patch) => getState().setSelection(patch),
dimPts: (id) => {
const g = getState().project.drawings2d.find((d) => d.id === id)?.geom;
return g?.shape === "dimension" ? g.pts.map((p) => ({ x: p.x, y: p.y })) : [];
},
notices: () => getState().notifications.map((n) => n.message),
selected: () => ({ drawings: [...getState().selection.drawings], groups: [...getState().selection.groups], all: JSON.stringify(getState().selection) }),
};
}