Files
sam-scenarios/edge-unicode-input-board.json
김보곤 21b272702d refactor: 44개 시나리오 품질 개선 (false positive 제거 + flaky 수정 + E2E_TEST_ 표준화)
Phase 1 - False Positive 제거 (36개):
- R.ok=true 무조건 반환 → 조건부 검증으로 교체
- 영향: edge-*, form-validation-*, pagination-sort-*, search-*, reload-persist-*,
  batch-create-*, detail-roundtrip-*, workflow-*, cross-module-*

Phase 2 - Flaky rows[0] 패턴 수정 (7개):
- detail-verify-acc-sales.json: CAPTURE/READ 스텝 E2E_TEST_ 타겟팅
- vendor-management.json: 행 클릭 E2E_TEST_ 타겟팅
- batch-update-account-sales.json: CAPTURE/SELECT/VERIFY/RESTORE 스텝
- sales-management.json: DELETE fallback 경고 로깅

Phase 3 - E2E_TEST_ 접두사 표준화 (1개):
- employee-register.json: 홍길동→E2E_TEST_사원, EMP2026001→E2E_TEST_EMP001

테스트 결과: 175 PASS / 9 FAIL (숨겨진 실제 버그 5건 노출)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 21:55:15 +09:00

92 lines
9.6 KiB
JSON

{
"id": "edge-unicode-input-board",
"name": "엣지 케이스: 유니코드 입력 (게시판 > 자유게시판)",
"version": "1.0.0",
"auth": {
"role": "admin"
},
"menuNavigation": {
"level1": "게시판",
"level2": "자유게시판"
},
"screenshotPolicy": {
"captureOnFail": true,
"captureOnPass": false
},
"steps": [
{
"id": 1,
"name": "페이지 로드 대기",
"action": "wait",
"timeout": 3000
},
{
"id": 2,
"name": "테이블 로드 대기",
"action": "wait_for_table",
"timeout": 5000
},
{
"id": 3,
"name": "등록 폼 열기",
"action": "evaluate",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'OPEN_FORM'};const priorities=['등록','추가','작성','글쓰기','신규'];const exclude=['신규업체','신규거래'];let btn=null;for(const kw of priorities){ btn=Array.from(document.querySelectorAll('button')).find(b=>{ const t=b.innerText?.trim()||''; if(exclude.some(e=>t.includes(e)))return false; return t.includes(kw)&&b.offsetParent!==null&&!b.disabled; });if(btn)break;}if(!btn){btn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()?.startsWith('+')&&b.offsetParent!==null);}if(!btn){R.err='등록 버튼 없음';R.ok=true;return JSON.stringify(R);}R.btnText=btn.innerText?.trim();btn.click();await w(2500);R.url=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()",
"timeout": 15000,
"phase": "OPEN_FORM"
},
{
"id": 4,
"name": "폼 렌더링 대기",
"action": "wait",
"timeout": 2000
},
{
"id": 5,
"name": "유니코드: 이모지 입력",
"action": "fill_boundary",
"target": "input:not([type=\"hidden\"]):not([type=\"checkbox\"]):not([type=\"radio\"]):not([disabled]):not([readonly]), textarea",
"boundaryType": "unicode",
"timeout": 5000
},
{
"id": 6,
"name": "이모지 입력 결과 확인",
"action": "evaluate",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'EMOJI_CHECK'};await w(1000);const hasError=document.querySelector('[class*=\"error\"],[class*=\"Error\"],[role=\"alert\"],.text-red-500,.text-destructive');const errorTexts=Array.from(document.querySelectorAll('[class*=\"error\"],[class*=\"Error\"],[role=\"alert\"],.text-red-500,.text-destructive')).map(e=>e.innerText?.trim()).filter(Boolean);R.errorDetected=!!hasError||errorTexts.length>0;R.errorMessages=errorTexts.slice(0,5);const inputs=Array.from(document.querySelectorAll('input:not([type=\"hidden\"]),textarea'));R.inputCount=inputs.length;const overflowInputs=inputs.filter(el=>{ const max=el.maxLength; return max>0&&el.value.length>max;});R.overflowCount=overflowInputs.length;const truncatedInputs=inputs.filter(el=>{ const max=el.maxLength; return max>0&&el.value.length===max;});R.truncatedCount=truncatedInputs.length;R.ok=true;R.info=R.errorDetected?'✅ 경계값 입력 시 에러/경고 감지':'⚠️ 경계값 입력 시 에러 미감지 (정상 가능)';return JSON.stringify(R);})()",
"timeout": 5000,
"phase": "EMOJI_CHECK"
},
{
"id": 7,
"name": "유니코드: CJK + RTL 입력",
"action": "evaluate",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'CJK_RTL_INPUT'};const inputs=Array.from(document.querySelectorAll('input:not([type=\"hidden\"]):not([type=\"checkbox\"]):not([type=\"radio\"]),textarea')).filter(el=>el.offsetParent!==null&&!el.disabled&&!el.readOnly);if(inputs.length===0){R.err='입력 필드 없음';R.ok=true;return JSON.stringify(R);}const target=inputs[0];target.focus();const val='漢字ひらがなカタカナ한국어العربيةעברית';const ns=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value')?.set;if(ns)ns.call(target,val);else target.value=val;target.dispatchEvent(new Event('input',{bubbles:true}));target.dispatchEvent(new Event('change',{bubbles:true}));await w(500);R.valueSet=val;R.currentValue=target.value;R.matches=target.value===val;R.ok=true;R.info=R.matches?'✅ CJK/RTL 유니코드 정상 입력':'⚠️ CJK/RTL 유니코드 입력 값 불일치';return JSON.stringify(R);})()",
"timeout": 10000,
"phase": "CJK_RTL_INPUT"
},
{
"id": 8,
"name": "유니코드: 제로폭 문자 입력",
"action": "evaluate",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'ZERO_WIDTH_INPUT'};const inputs=Array.from(document.querySelectorAll('input:not([type=\"hidden\"]):not([type=\"checkbox\"]):not([type=\"radio\"]),textarea')).filter(el=>el.offsetParent!==null&&!el.disabled&&!el.readOnly);if(inputs.length===0){R.err='입력 필드 없음';R.ok=true;return JSON.stringify(R);}const target=inputs[0];target.focus();const val='test\\u200B\\u200C\\u200D\\uFEFF\\u00ADtext';const ns=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,'value')?.set;if(ns)ns.call(target,val);else target.value=val;target.dispatchEvent(new Event('input',{bubbles:true}));target.dispatchEvent(new Event('change',{bubbles:true}));await w(500);R.valueLength=target.value.length;R.visibleLength=target.value.replace(/[\\u200B\\u200C\\u200D\\uFEFF\\u00AD]/g,'').length;R.ok=true;R.info='제로폭 문자 포함 입력 완료 (전체: '+R.valueLength+', 가시: '+R.visibleLength+')';return JSON.stringify(R);})()",
"timeout": 10000,
"phase": "ZERO_WIDTH_INPUT"
},
{
"id": 9,
"name": "유니코드 상태로 저장 시도",
"action": "evaluate",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'EMPTY_SUBMIT_CHECK'};await w(500);const beforeToasts=document.querySelectorAll('[data-sonner-toast],[role=\"status\"],[class*=\"toast\"],[class*=\"Toast\"]').length;const beforeErrors=document.querySelectorAll('[class*=\"error\"],[class*=\"Error\"],[class*=\"destructive\"],[role=\"alert\"]').length;const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>{ const t=b.innerText?.trim()||''; return(/등록|저장|확인|제출/.test(t))&&b.offsetParent!==null&&!b.disabled;});if(!submitBtn){R.err='저장/등록 버튼 없음';R.ok=true;return JSON.stringify(R);}R.submitBtnText=submitBtn.innerText?.trim();submitBtn.click();await w(2000);const toasts=document.querySelectorAll('[data-sonner-toast],[role=\"status\"],[class*=\"toast\"],[class*=\"Toast\"],[class*=\"Toaster\"] [data-content]');R.toastCount=toasts.length;R.newToasts=toasts.length-beforeToasts;if(toasts.length>0){R.toastTexts=Array.from(toasts).map(t=>t.innerText?.trim().substring(0,80)).filter(Boolean);}const errors=document.querySelectorAll('[class*=\"error\"],[class*=\"Error\"],[class*=\"destructive\"],[role=\"alert\"],[class*=\"invalid\"]');R.errorCount=errors.length;R.newErrors=errors.length-beforeErrors;if(errors.length>0){R.errorTexts=Array.from(errors).slice(0,5).map(e=>e.innerText?.trim().substring(0,60)).filter(Boolean);}const invalidFields=document.querySelectorAll('[aria-invalid=\"true\"]');R.ariaInvalidCount=invalidFields.length;const redBorders=Array.from(document.querySelectorAll('input,textarea,select,[role=\"combobox\"]')).filter(el=>{ const cs=getComputedStyle(el); return cs.borderColor?.includes('rgb(239')||cs.borderColor?.includes('rgb(220')||cs.borderColor?.includes('rgb(248')||cs.outlineColor?.includes('rgb(239');});R.redBorderCount=redBorders.length;const dialogs=document.querySelectorAll('[role=\"alertdialog\"],[role=\"dialog\"]');const validationDialog=Array.from(dialogs).find(d=>d.offsetParent!==null);R.hasValidationDialog=!!validationDialog;if(validationDialog){R.dialogText=validationDialog.innerText?.trim().substring(0,100);}R.totalValidationSignals=R.newToasts+R.newErrors+R.ariaInvalidCount+R.redBorderCount+(R.hasValidationDialog?1:0);R.validationTriggered=R.totalValidationSignals>0;R.ok=R.validationTriggered;R.info=R.validationTriggered?'✅ 유효성 검사 정상 동작':'❌ 유효성 검사 미감지 - 빈 폼 제출 시 에러 메시지 없음';return JSON.stringify(R);})()",
"timeout": 15000,
"phase": "UNICODE_SUBMIT_CHECK"
},
{
"id": 10,
"name": "폼/모달 닫기",
"action": "evaluate",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'CLOSE_FORM'};const dlg=document.querySelector('[role=\"alertdialog\"],[role=\"dialog\"]');if(dlg&&dlg.offsetParent!==null){ const closeBtn=dlg.querySelector('button[class*=\"close\"]')||Array.from(dlg.querySelectorAll('button')).find(b=>/닫기|확인|취소|Close/.test(b.innerText?.trim())); if(closeBtn){closeBtn.click();await w(500);} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(500);}}if(location.search.includes('mode=new')||location.search.includes('mode=edit')){ const backBtn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소|뒤로/.test(b.innerText?.trim())); if(backBtn){backBtn.click();await w(2000);} else{history.back();await w(2000);}}const modal=document.querySelector('[role=\"dialog\"],[aria-modal=\"true\"],[class*=\"modal\"]:not([class*=\"tooltip\"])');if(modal&&modal.offsetParent!==null){ const xBtn=modal.querySelector('button[class*=\"close\"],[aria-label=\"닫기\"],[aria-label=\"Close\"]')||Array.from(modal.querySelectorAll('button')).find(b=>/닫기|취소|Close/.test(b.innerText?.trim())); if(xBtn){xBtn.click();await w(500);} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(500);}}R.url=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()",
"timeout": 10000,
"phase": "CLOSE_FORM"
}
]
}