- 기성고 화면을 native-progress-view.js 로 옮김 - 코드·레벨·사정금액·노재경 구분(비목순서·실적)·비고란·집계공종 진하게·수량/금액 0 숨김·품명정렬·두줄·바탕색 반영 - Enter 뒤 셀 이동 방향, 취소면 연 때 값으로 되돌림 - 주 메뉴 환경설정은 기성 화면에서 이 창을 엶 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
62 lines
2.2 KiB
Python
62 lines
2.2 KiB
Python
"""기성 환경설정: 옵션 기본값·비목 열 순서·표 머리 반영."""
|
|
|
|
from test_est_rea_parity import run
|
|
|
|
|
|
def test_defaults_and_part_order():
|
|
result = run(
|
|
"math",
|
|
"""(()=>{
|
|
const d=EstProgressView.get({});
|
|
const o=(x)=>EstProgressView.parts(EstProgressView.get({Display:{order:x.order},AccomOption:x}));
|
|
return {code:d.code,sajung:d.sajung,gubun:d.gubun,
|
|
a:o({order:0}),b:o({order:2,siljuk:true}),c:o({order:3}),d:o({order:5})};
|
|
})()""",
|
|
)
|
|
assert result == {
|
|
"code": True,
|
|
"sajung": True,
|
|
"gubun": False,
|
|
"a": ["T", "N", "G", "J"],
|
|
"b": ["N", "G", "J", "S", "T"],
|
|
"c": ["G", "N", "J", "T"],
|
|
"d": ["T", "N", "G", "J"],
|
|
}
|
|
|
|
|
|
def test_view_headers_follow_options_and_zero_hiding():
|
|
result = run(
|
|
"math",
|
|
"""(()=>{
|
|
const p=EstNative.empty();p.options.SourceRefresh=false;
|
|
p.tables.EstMainDat=[{Code:'A',Name:'a',GN:10,GU:100},{LinkIndex:54}];
|
|
const q=EstNative.calculate(p);q.progress=[{id:'r1',name:'1회',inputs:{},locked:false}];
|
|
const g=globalThis;g.EstApp={...(g.EstApp||{}),esc:String,number:String};
|
|
g.EstProgressWonga={render:()=>''};
|
|
const box=(t,tools,body)=>body,button=()=>'',table=(h,rows)=>JSON.stringify({h,rows});
|
|
const st={progressPage:0,selection:new Set()};
|
|
const head=(o)=>{q.options.Display=o.d;q.options.AccomOption=o.a;
|
|
return JSON.parse(EstProgressView.view({...st},q,{box,button,table}).split('<p')[0]);};
|
|
const plain=head({});
|
|
const custom=head({d:{code:false,gnZero:false},a:{level:true,sajung:false,gubun:true,gungu:true}});
|
|
return {plain:plain.h,custom:custom.h,jun:custom.rows[0][3]};
|
|
})()""",
|
|
)
|
|
assert result["plain"][0] == "코드" and "사정금액" in result["plain"]
|
|
assert result["custom"] == [
|
|
"레벨",
|
|
"공종",
|
|
"도급수량",
|
|
"전회수량",
|
|
"금회 입력",
|
|
"입력방법",
|
|
"금회금액",
|
|
"금회 노무",
|
|
"금회 재료",
|
|
"금회 경비",
|
|
"누계수량",
|
|
"누계금액",
|
|
"비고",
|
|
]
|
|
assert result["jun"] == ""
|