feat: 프로젝트 공통 지반모델·교대 지반 통합·재료표/수량 진입·옥성교 랜딩 히어로 (11-06~11-09 작업분)
공용 파일(main.ts·index.html·style.css)에서 서로 얽혀 있어 한 커밋으로 묶음. - 지반: ① 형상 프로젝트 지반모델 관리창(생성·JSON 불러오기·교각별 비교·선택 적용), 프로젝트 JSON 내장 groundModel 추출, 교대 8행 통합 적용·공통지형 중복격자 제외 - 재료표·수량: 상단 ⑤ 메뉴·배근 바로가기, 결과 교각/탭 기억, 수량 워크북·정합 보정 - 랜딩: 옥성교 6교각 히어로 이미지·투영 강조점·좌→우 광선·지형 라운드/도로 연결 - 검증 스크립트(verify-project-ground/ground-abutments/okseong-user-files/quantity-*/landing-hero 등) 정본: DOC/04_실행/실행_*_2026-11-09_v0.1.00.md Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b2bebe47eb
commit
fc520ec03d
47 files changed
+2848
-149
No files matched your search
@@ -114,6 +114,22 @@ describe('지형 격자 (schema 2)', () => {
|
||||
});
|
||||
|
||||
describe('형식 번호 검사', () => {
|
||||
it('프로젝트 JSON에서는 내장 지반모델만 가져온다', () => {
|
||||
const groundModel = { schema: 2, generated: '2026-11-09', piers: [{ id: 'P1', centerEl: 18.011, excelEl: null }], terrainGrid: { origin: [0, 0], step: 1, nx: 2, ny: 2, z: [1, 2, 3, 4] } };
|
||||
const imported = parseGroundModel(JSON.stringify({ schemaVersion: 1, project: { name: '다른 프로젝트' }, piers: [{ input: { groundEl: 999 } }], groundModel }));
|
||||
expect(imported).toEqual(groundModel);
|
||||
expect(imported).not.toHaveProperty('project');
|
||||
expect(imported.piers[0].centerEl).toBe(18.011);
|
||||
});
|
||||
it('프로젝트 내부의 잘못된 지반모델과 알 수 없는 프로젝트 형식을 거부한다', () => {
|
||||
expect(() => parseGroundModel(JSON.stringify({ schemaVersion: 1, groundModel: { schema: 2, piers: [{ id: 'P1', centerEl: 'wrong', excelEl: null }] } }))).toThrow('값이 맞지 않습니다');
|
||||
expect(() => parseGroundModel(JSON.stringify({ schemaVersion: 99, groundModel: { schema: 2, piers: [] } }))).toThrow('프로젝트 형식 번호 99');
|
||||
});
|
||||
it('구조가 다른 JSON을 형식 번호 undefined 대신 구체적인 파일 안내로 거부한다', () => {
|
||||
expect(() => parseGroundModel(JSON.stringify({ drawing: '도면.dwg', output: 'output', piers: '입력.xlsx' }))).toThrow('지반 생성 설정 파일');
|
||||
expect(() => parseGroundModel(JSON.stringify({ schemaVersion: 1, piers: [] }))).toThrow('프로젝트 열기');
|
||||
expect(() => parseGroundModel(JSON.stringify({ status: 'ok', json: 'ground_model.json' }))).toThrow('결과 요약 JSON');
|
||||
});
|
||||
it('accepts a legacy file without a schema number when it has the standard pier structure', () => {
|
||||
const m = parseGroundModel(JSON.stringify({ piers: [{ id: 'P1', ground: { center: 29.355, excel: 28.931 } }] }));
|
||||
expect(m.schema).toBe(2);
|
||||
|
||||
Reference in new issue
Block a user