fix(parse): reject split pier tables and block sheets that fail to build

- E05: a sheet whose pier, IP, or bearing table is not on the same sheet is
  not selectable (spec 2.2: one sheet per pier)
- a sheet is selectable only if every pier in it builds; the reason is shown
  next to the sheet instead of a selectable sheet with an unchecked pier

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
ypshimandClaude Haiku 5.5 committed 2026-10-21 17:55:46 +09:00
1 parent 69922cfa35
commit 4f21bd63bf
3 files changed
+36

No files matched your search

+11
View File
@@ -49,3 +49,14 @@ describe('sheet report (spec §2.3)', () => {
expect(piers).toHaveLength(0);
});
});
describe('tables split across sheets (spec §2.2: 시트 1장 = 교각 1기)', () => {
it('reports E05 and drops the pier when the IP table is not on the same sheet', () => {
const wb = loadWorkbook();
wb.Sheets['intent.PR']['B25'].v = '기타';
const { piers, sheets, issues } = parseWorkbook(wb);
expect(issues.map((i) => i.code)).toContain('E05');
expect(piers).toHaveLength(0);
expect(sheets[0].ok).toBe(false);
});
});