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>
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
"id": 3,
|
||||
"name": "[회계관리 > 매출관리] [CAPTURE] 첫 행 현재 매출유형 캡처",
|
||||
"action": "evaluate",
|
||||
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'CAPTURE_BEFORE'};await w(500);const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;if(rows.length===0){R.error='테이블에 데이터 없음';R.ok=false;return JSON.stringify(R);}const firstRow=rows[0];const cells=firstRow.querySelectorAll('td');R.cellCount=cells.length;const typeColIdx=[5,4,3].find(idx=>cells[idx]&&cells[idx].innerText?.trim()!=='');const typeValue=typeColIdx!==undefined?cells[typeColIdx]?.innerText?.trim():'';R.beforeType=typeValue;window.__E2E_BEFORE_TYPE__=typeValue;R.firstRowText=firstRow.innerText?.substring(0,100);R.ok=true;return JSON.stringify(R);})()",
|
||||
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'CAPTURE_BEFORE'};await w(500);const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;if(rows.length===0){R.error='테이블에 데이터 없음';R.ok=false;return JSON.stringify(R);}const testRow=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));const firstRow=testRow||rows[0];R.usedTestRow=!!testRow;const cells=firstRow.querySelectorAll('td');R.cellCount=cells.length;const typeColIdx=[5,4,3].find(idx=>cells[idx]&&cells[idx].innerText?.trim()!=='');const typeValue=typeColIdx!==undefined?cells[typeColIdx]?.innerText?.trim():'';R.beforeType=typeValue;window.__E2E_BEFORE_TYPE__=typeValue;R.firstRowText=firstRow.innerText?.substring(0,100);R.ok=true;return JSON.stringify(R);})()",
|
||||
"timeout": 15000,
|
||||
"phase": "CAPTURE"
|
||||
},
|
||||
@@ -38,7 +38,7 @@
|
||||
"id": 4,
|
||||
"name": "[회계관리 > 매출관리] [SELECT] 첫 행 체크박스 선택",
|
||||
"action": "evaluate",
|
||||
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'SELECT_ROW'};const rows=document.querySelectorAll('table tbody tr');if(rows.length===0){R.error='행 없음';R.ok=false;return JSON.stringify(R);}const firstRow=rows[0];const checkbox=firstRow.querySelector('input[type=\"checkbox\"],button[role=\"checkbox\"]');if(checkbox){checkbox.click();await w(500);R.checked=true;}else{firstRow.querySelector('td')?.click();await w(500);R.clickedFirstCell=true;}R.ok=true;return JSON.stringify(R);})()",
|
||||
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'SELECT_ROW'};const rows=document.querySelectorAll('table tbody tr');if(rows.length===0){R.error='행 없음';R.ok=false;return JSON.stringify(R);}const testRow2=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));const firstRow=testRow2||rows[0];R.usedTestRow=!!testRow2;const checkbox=firstRow.querySelector('input[type=\"checkbox\"],button[role=\"checkbox\"]');if(checkbox){checkbox.click();await w(500);R.checked=true;}else{firstRow.querySelector('td')?.click();await w(500);R.clickedFirstCell=true;}R.ok=true;return JSON.stringify(R);})()",
|
||||
"timeout": 10000,
|
||||
"phase": "SELECT"
|
||||
},
|
||||
@@ -104,7 +104,7 @@
|
||||
"id": 13,
|
||||
"name": "[회계관리 > 매출관리] [VERIFY-3] ★핵심★ 새로고침 후에도 변경값 유지 확인",
|
||||
"action": "evaluate",
|
||||
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY_PERSIST'};await w(1000);const beforeType=window.__E2E_BEFORE_TYPE__||'';const newType=window.__E2E_NEW_TYPE__||'';const rows=document.querySelectorAll('table tbody tr');if(rows.length===0){R.error='테이블 행 없음 after reload';R.ok=false;return JSON.stringify(R);}const firstRow=rows[0];const cells=firstRow.querySelectorAll('td');const currentTypes=Array.from(cells).map(c=>c.innerText?.trim()).filter(Boolean);R.beforeType=beforeType;R.expectedNewType=newType;R.currentCellValues=currentTypes.slice(0,8);const persisted=newType&¤tTypes.some(v=>v.includes(newType));const reverted=beforeType&¤tTypes.some(v=>v===beforeType)&&!persisted;R.persistedAfterReload=persisted;R.revertedAfterReload=reverted;R.ok=true;if(reverted&&beforeType!==newType){R.bugDetected=true;R.info='🐛 BUG-SALES-20260115-001 재현: 새로고침 후 원래값 복귀 ('+beforeType+')';}else if(persisted){R.info='✅ 새로고침 후에도 변경값 유지 ('+newType+')';}else{R.info='⚠️ 새로고침 후 상태 확인 불가';}return JSON.stringify(R);})()",
|
||||
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY_PERSIST'};await w(1000);const beforeType=window.__E2E_BEFORE_TYPE__||'';const newType=window.__E2E_NEW_TYPE__||'';const rows=document.querySelectorAll('table tbody tr');if(rows.length===0){R.error='테이블 행 없음 after reload';R.ok=false;return JSON.stringify(R);}const testRow3=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));const firstRow=testRow3||rows[0];R.usedTestRow=!!testRow3;const cells=firstRow.querySelectorAll('td');const currentTypes=Array.from(cells).map(c=>c.innerText?.trim()).filter(Boolean);R.beforeType=beforeType;R.expectedNewType=newType;R.currentCellValues=currentTypes.slice(0,8);const persisted=newType&¤tTypes.some(v=>v.includes(newType));const reverted=beforeType&¤tTypes.some(v=>v===beforeType)&&!persisted;R.persistedAfterReload=persisted;R.revertedAfterReload=reverted;R.ok=true;if(reverted&&beforeType!==newType){R.bugDetected=true;R.info='🐛 BUG-SALES-20260115-001 재현: 새로고침 후 원래값 복귀 ('+beforeType+')';}else if(persisted){R.info='✅ 새로고침 후에도 변경값 유지 ('+newType+')';}else{R.info='⚠️ 새로고침 후 상태 확인 불가';}return JSON.stringify(R);})()",
|
||||
"timeout": 15000,
|
||||
"phase": "VERIFY"
|
||||
},
|
||||
@@ -112,7 +112,7 @@
|
||||
"id": 14,
|
||||
"name": "[회계관리 > 매출관리] [RESTORE] 원래 값 복원 (선택적)",
|
||||
"action": "evaluate",
|
||||
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'RESTORE'};const beforeType=window.__E2E_BEFORE_TYPE__||'';if(!beforeType){R.info='원래 값 없음 - 복원 스킵';R.ok=true;return JSON.stringify(R);}const rows=document.querySelectorAll('table tbody tr');if(rows.length===0){R.ok=true;return JSON.stringify(R);}const firstRow=rows[0];const checkbox=firstRow.querySelector('input[type=\"checkbox\"],button[role=\"checkbox\"]');if(checkbox)checkbox.click();await w(500);const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"],select')).filter(b=>b.offsetParent!==null);if(combos.length>0){const cb=combos[0];if(cb.tagName==='SELECT'){for(let i=0;i<cb.options.length;i++){if(cb.options[i].text===beforeType){cb.selectedIndex=i;cb.dispatchEvent(new Event('change',{bubbles:true}));break;}}}else{cb.click();await w(600);const lb=document.querySelector('[role=\"listbox\"]');if(lb){const opt=Array.from(lb.querySelectorAll('[role=\"option\"]')).find(o=>o.innerText?.trim()===beforeType);if(opt){opt.click();await w(400);}else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);}}}}const saveBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='저장'&&b.offsetParent!==null);if(saveBtn){saveBtn.click();await w(1500);const cfm=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button')).find(b=>/확인/.test(b.innerText?.trim()));if(cfm){cfm.click();await w(2000);}}R.info='원래 값 복원 시도 완료';R.ok=true;return JSON.stringify(R);})()",
|
||||
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'RESTORE'};const beforeType=window.__E2E_BEFORE_TYPE__||'';if(!beforeType){R.info='원래 값 없음 - 복원 스킵';R.ok=true;return JSON.stringify(R);}const rows=document.querySelectorAll('table tbody tr');if(rows.length===0){R.ok=true;return JSON.stringify(R);}const testRow4=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));const firstRow=testRow4||rows[0];R.usedTestRow=!!testRow4;const checkbox=firstRow.querySelector('input[type=\"checkbox\"],button[role=\"checkbox\"]');if(checkbox)checkbox.click();await w(500);const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"],select')).filter(b=>b.offsetParent!==null);if(combos.length>0){const cb=combos[0];if(cb.tagName==='SELECT'){for(let i=0;i<cb.options.length;i++){if(cb.options[i].text===beforeType){cb.selectedIndex=i;cb.dispatchEvent(new Event('change',{bubbles:true}));break;}}}else{cb.click();await w(600);const lb=document.querySelector('[role=\"listbox\"]');if(lb){const opt=Array.from(lb.querySelectorAll('[role=\"option\"]')).find(o=>o.innerText?.trim()===beforeType);if(opt){opt.click();await w(400);}else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);}}}}const saveBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='저장'&&b.offsetParent!==null);if(saveBtn){saveBtn.click();await w(1500);const cfm=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button')).find(b=>/확인/.test(b.innerText?.trim()));if(cfm){cfm.click();await w(2000);}}R.info='원래 값 복원 시도 완료';R.ok=true;return JSON.stringify(R);})()",
|
||||
"timeout": 20000,
|
||||
"phase": "RESTORE"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user