"script":"(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY_TOAST'};await w(1000);const toasts=document.querySelectorAll('[data-sonner-toast],[role=\"status\"],[class*=\"toast\"],[class*=\"Toast\"],[class*=\"Toaster\"] [data-content]');R.toastCount=toasts.length;R.toastTexts=Array.from(toasts).map(t=>t.innerText?.trim().substring(0,80)).filter(Boolean);const successToast=R.toastTexts.some(t=>/성공|완료|저장|변경/.test(t));R.successToast=successToast;R.ok=true;R.info=successToast?'✅ 성공 토스트 확인':'⚠️ 성공 토스트 미감지';return JSON.stringify(R);})()",
"timeout":10000,
"phase":"VERIFY"
},
{
"id":9,
"name":"[회계관리 > 매출관리] [VERIFY-2] ★핵심★ 첫 행 매출유형 실제 변경 확인",
"action":"evaluate",
"script":"(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY_DATA_CHANGED'};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='테이블 행 없음';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 changed=newType&¤tTypes.some(v=>v.includes(newType));const unchanged=beforeType&¤tTypes.some(v=>v===beforeType);R.dataActuallyChanged=changed;R.dataStillOld=unchanged&&!changed;R.ok=true;if(R.dataStillOld&&beforeType!==newType){R.bugDetected=true;R.info='🐛 BUG-SALES-20260115-001 재현: 토스트 성공 but 데이터 미변경 (beforeType='+beforeType+', expected='+newType+')';}else if(R.dataActuallyChanged){R.info='✅ 데이터 실제 변경 확인 ('+beforeType+' → '+newType+')';}else{R.info='⚠️ 변경 확인 불가 (beforeType='+beforeType+', newType='+newType+')';}return JSON.stringify(R);})()",
"timeout":15000,
"phase":"VERIFY"
},
{
"id":10,
"name":"[회계관리 > 매출관리] [RELOAD] 새로고침",
"action":"reload",
"timeout":10000
},
{
"id":11,
"name":"[회계관리 > 매출관리] [RELOAD] 새로고침 후 대기",
"action":"wait",
"timeout":5000
},
{
"id":12,
"name":"[회계관리 > 매출관리] [RELOAD] 테이블 재로드 대기",
"action":"wait_for_table",
"timeout":8000
},
{
"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);})()",