import { describe, expect, it } from 'vitest'; import { abutBearingPlanSvg, abutBearingSectionSvg, abutSolplateSvg, type AbutBearingDetail } from '../src/view/abut-bearing-svg'; // 운곡교 A1 받침 ① (교대 받침 표의 값: 블럭 125 = 75 + 50, h3 181, T 30, L 800, T1 38 / T2 22, 회전 −4.42°). const d: AbutBearingDetail = { no: 1, blockMm: 1200, padMm: 1000, A: 700, B: 640, L: 800, W: 740, h1: 75, h2: 50, h3: 181, h4: 30, T1: 38, T2: 22, rotDeg: -4.42, S: -1.91, seatEl: 44.367, z: 44.492, }; describe('교대 받침 삽도 (시안 ② 교량받침 카드)', () => { it('평면: block, pad, solplate and bearing sizes, turned by the bearing azimuth', () => { const svg = abutBearingPlanSvg(d); expect(svg).toContain('700 × 640'); expect(svg).toContain('솔플 800 × 740 · 패드 1000'); expect(svg).toContain('rotate(4.420 150 130)'); expect(svg.match(/ { const svg = abutBearingSectionSvg(d); for (const s of ['h1 75', 'h2 50', 'h3 181', 'h4 30', 'E = 336', '교좌면 44.367', 'z 44.492']) expect(svg).toContain(s); expect(svg.match(/ { const svg = abutSolplateSvg(d); for (const s of ['T1 38', 'T2 22', 'L 800 · W 740', 'S -1.910 %']) expect(svg).toContain(s); }); });