Files
Pier_v1/tests/abut-member-list.test.ts
T
ypshimandClaude Opus 5.5 55b679932e feat(abut): ② 벽체·흉벽 카드를 시안대로 작성 (삽도 2개, 브라켓 폭 입력, 확대기초·말뚝 분리)
- 삽도 2개 (src/view/abut-wall-svg.ts): 교대축 직각 단면(① 구간, "300 + 500 + 1600 = 2400", 흉벽 상단·브라켓 상면·교좌면·저판 EL)과 정면·배면도(교좌면 계단, 흉벽 상단 경사, 받침, 수축줄눈). 생성본 값, 가로·세로 같은 축척
- 벽체 두께는 자동 (= 브라켓 폭 + 흉벽 두께 + 교좌면 폭). 입력은 브라켓 폭(기본 300). 예전 저장 파일의 벽체 두께는 브라켓 폭으로 바꿔 읽음 (normalizeShape)
- 인접 무시 기준(기본 5 mm) 입력: 이웃 받침의 교좌면 EL 차이가 이 값보다 작으면 한 구간으로 묶음 (A1 단차 71 mm, 변화 없음)
- 카드 구성: 벽체 형식(기본형만, QA-8) → 삽도 → 입력 격자(시안 순서, QA-4 표시) → 자동 값(벽체 두께, 흉벽 상단 IP3/IP1, 교대축) → 구간 표 → 확인 필요 → 시안 메모
- 저판·말뚝 입력 5개를 새 "확대기초 · 말뚝" 카드로 분리. 부재 목록 6행(시안 순서), 변경 표시도 카드별로 나눔
- 테스트 갱신·추가. 전체 655건 통과, 타입 검사·빌드 통과. 브라우저 시각 확인은 미실시

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 18:51:03 +09:00

52 lines
2.4 KiB
TypeScript

import { describe, expect, it } from 'vitest';
import { ABUT_MEMBER_EDITABLE, abutMemberRows } from '../src/core/abut/member-list';
const base = {
bearings: [{ seatEl: undefined }, { seatEl: undefined }],
groundEl: 33.984,
};
describe('교대 부재 목록 (시안 ② 부재 · 교대)', () => {
it('has the six rows of the mockup, in order', () => {
const rows = abutMemberRows(base, '11.253 m');
expect(rows.map((r) => r.id)).toEqual(['bearing', 'shape', 'footing', 'wing', 'slab', 'ground']);
expect(rows[0].label).toBe('교량받침·받침블럭·솔플레이트');
});
it('a default abutment shows no change marks', () => {
expect(abutMemberRows(base, '—').every((r) => !r.changed)).toBe(true);
});
it('marks the shape when a value differs from the default', () => {
const rows = abutMemberRows({ ...base, shape: { parapetHeightMm: 2200 } }, '—');
expect(rows.find((r) => r.id === 'shape')?.changed).toBe(true);
expect(rows.find((r) => r.id === 'shape')?.summary).toBe('벽체 두께 2400 (자동) · 흉벽 2200');
expect(rows.find((r) => r.id === 'footing')?.changed).toBe(false);
const foot = abutMemberRows({ ...base, shape: { footingThicknessMm: 1300 } }, '—');
expect(foot.find((r) => r.id === 'footing')?.changed).toBe(true);
expect(foot.find((r) => r.id === 'shape')?.changed).toBe(false);
});
it('marks the wing when a side is not the general form, and names both sides', () => {
const rows = abutMemberRows({ ...base, wings: { left: 'general', right: 'short' } }, '—');
const wing = rows.find((r) => r.id === 'wing');
expect(wing?.changed).toBe(true);
expect(wing?.summary).toBe('좌 일반형 · 우 단축형');
});
it('marks a 받침 that has its own 교좌면 EL', () => {
const rows = abutMemberRows({ ...base, bearings: [{ seatEl: 44.4 }, { seatEl: undefined }] }, '—');
expect(rows[0].changed).toBe(true);
});
it('shows the slab width text and the ground EL as given', () => {
const rows = abutMemberRows(base, '11.253 m');
expect(rows.find((r) => r.id === 'slab')?.summary).toBe('11.253 m');
expect(rows.find((r) => r.id === 'ground')?.summary).toBe('지반고 33.984 m');
});
it('only the bearing, shape, footing and wing cards take input in this step', () => {
expect(ABUT_MEMBER_EDITABLE).toEqual({ bearing: true, shape: true, footing: true, wing: true, slab: false, ground: false });
});
});