import { describe, expect, it } from 'vitest'; import { abutShown, piersShown } from '../src/core/abut/visibility'; describe('형상계획 ②: 선택한 객체만 3D에 그림', () => { it('a selected abutment hides the piers in ②', () => { expect(piersShown('plan', 'A1')).toBe(false); expect(abutShown('plan', 'A1', 'A1')).toBe(true); expect(abutShown('plan', 'A1', 'A2')).toBe(false); }); it('a selected pier (no abutment selected) hides every abutment in ②', () => { expect(piersShown('plan', null)).toBe(true); expect(abutShown('plan', null, 'A1')).toBe(false); expect(abutShown('plan', null, 'A2')).toBe(false); }); it('① keeps the piers and every abutment as before', () => { expect(piersShown('shape', 'A1')).toBe(true); expect(piersShown('shape', null)).toBe(true); expect(abutShown('shape', 'A1', 'A2')).toBe(true); expect(abutShown('shape', null, 'A1')).toBe(true); }); it('③ and ④ are not affected by the abutment selection', () => { expect(piersShown('rebar', 'A1')).toBe(true); expect(abutShown('rebar', null, 'A1')).toBe(true); }); });