import { describe, expect, it } from 'vitest'; import { buildPier } from '../src/core/geometry'; import { footingLegRows } from '../src/core/rebar/footing-legs'; import { footingCornerSvg } from '../src/view/footing-corner-svg'; import { loadP1 } from './helpers'; describe('확대기초 다리 배치 상세 · B10 모서리 (승인 2026-10-27)', () => { const m = buildPier(loadP1()); const rows = footingLegRows(m); const byBar = (name: string) => rows.find((r) => r.bar === name)!; it('lists the 12 bar families of the footing', () => { expect(rows.map((r) => r.bar)).toEqual(['B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7', 'B8', 'B10-1', 'B10-2', 'B11', 'B12']); }); it('B2 leg goes up to the B1 height (1723); straight bars have no leg', () => { expect(byBar('B2').legLength).toBeCloseTo(1723, 0); expect(byBar('B4').legLength).toBeNull(); expect(byBar('B8').legLength).toBeNull(); }); it('B6 (13646) needs a splice, B1 (under 12000) does not', () => { expect(byBar('B6').splice).toBe(true); expect(byBar('B1').splice).toBe(false); }); it('B10 corner shows the depths, the 296 hook, and the lowest level removed', () => { const svg = footingCornerSvg(m); expect(svg).toContain('B10-2 122.25'); expect(svg).toContain('B10-1 123.85'); expect(svg).toContain('l_h 296'); expect(svg).toContain('단 수 8'); }); });