fix(rebar): 부재 fck 되돌리기가 교각도 기본값으로 돌아가고, 기본과 다르면 주황색 표시
- IMPORTED_FCK(기둥 40, 코핑 40, 확대기초 27)와 fckChanged 추가, 테스트 4건 - 되돌리기는 공통 fck가 아니라 교각도 기본값으로 돌아감 (기둥·코핑은 기존에 27로 돌아가던 문제) - 기본과 다르면 입력 카드를 주황색으로 표시. "변경 n건"에는 넣지 않음 (배근에만 반영) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9a338614a6
commit
70fa0be86f
3 files changed
+41
-8
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { fckChanged, IMPORTED_FCK } from '../src/core/rebar/common';
|
||||
|
||||
describe('IMPORTED_FCK (교각도 기준 부재별 기본 fck)', () => {
|
||||
it('is 40 for 기둥·코핑 and 27 for 확대기초', () => {
|
||||
expect(IMPORTED_FCK).toEqual({ column: 40, coping: 40, footing: 27 });
|
||||
});
|
||||
});
|
||||
|
||||
describe('fckChanged (기본과 다르면 주황색)', () => {
|
||||
it('is false at the imported default', () => {
|
||||
expect(fckChanged({ column: 40, coping: 40, footing: 27 }, 'coping')).toBe(false);
|
||||
});
|
||||
|
||||
it('is true when the member differs from its imported default', () => {
|
||||
expect(fckChanged({ coping: 42 }, 'coping')).toBe(true);
|
||||
expect(fckChanged({ footing: 30 }, 'footing')).toBe(true);
|
||||
});
|
||||
|
||||
it('is false when the member has no value yet', () => {
|
||||
expect(fckChanged({}, 'column')).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user