refactor: 비표준 포맷 13개 시나리오 Format A 통일

- actions 배열(Format B) → 단일 action(Format A) 변환
- fill_form fields: target 키 → name 키 수정
- verify_detail checks: 객체 배열 → 문자열 배열 수정
- 전체 13개 시나리오 E2E 테스트 PASS 확인
This commit is contained in:
김보곤
2026-02-28 17:21:01 +09:00
parent 21f2a72dee
commit 23827c257d
20 changed files with 634 additions and 2434 deletions

View File

@@ -66,7 +66,7 @@
"id": 8,
"name": "[게시판 > 자유게시판] [DELETE] 데이터 삭제",
"action": "evaluate",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;const R={phase:'DELETE'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes(ts))||rows.find(r=>r.innerText?.includes('E2E_TEST_'));if(!targetRow){R.error='E2E_TEST_ 데이터 없음';R.ok=false;return JSON.stringify(R);}R.targetText=targetRow.innerText?.substring(0,60);R.ts=ts;targetRow.click();await w(2500);R.detailUrl=location.pathname+location.search;const delBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='삭제');if(!delBtn){R.error='삭제 버튼 없음';R.ok=false;return JSON.stringify(R);}delBtn.click();await w(1000);const confirmBtn=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button,button')).find(b=>/확인|삭제|예|Yes/.test(b.innerText?.trim())&&b!==delBtn&&b.offsetParent!==null);if(confirmBtn){confirmBtn.click();await w(3000);}R.urlAfter=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const ts=window.__E2E_TS__||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'DELETE'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes(ts))||rows.find(r=>r.innerText?.includes('E2E_TEST_'));if(!targetRow){R.error='E2E_TEST_ 데이터 없음';R.ok=false;return JSON.stringify(R);}R.targetText=targetRow.innerText?.substring(0,60);R.ts=ts;targetRow.click();await w(2500);R.detailUrl=location.pathname+location.search;const delBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='삭제'&&b.offsetParent!==null);if(!delBtn){R.error='삭제 버튼 없음';R.ok=false;return JSON.stringify(R);}delBtn.click();await w(1500);let confirmBtn=document.querySelector('[role=\"alertdialog\"] [data-slot=\"alert-dialog-footer\"] button:last-child');if(!confirmBtn){confirmBtn=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button')).find(b=>/삭제/.test(b.innerText?.trim())&&b!==delBtn);}if(!confirmBtn){confirmBtn=Array.from(document.querySelectorAll('button')).find(b=>/확인|삭제/.test(b.innerText?.trim())&&b!==delBtn&&b.offsetParent!==null);}if(confirmBtn){confirmBtn.click();await w(4000);}R.urlAfter=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()",
"timeout": 30000,
"phase": "DELETE",
"critical": true
@@ -91,11 +91,29 @@
"action": "wait",
"timeout": 2000
},
{
"id": 100,
"name": "[게시판 > 자유게시판] [VERIFY] 삭제 후 새로고침",
"action": "reload",
"timeout": 10000
},
{
"id": 101,
"name": "[게시판 > 자유게시판] [VERIFY] 새로고침 대기",
"action": "wait",
"timeout": 3000
},
{
"id": 102,
"name": "[게시판 > 자유게시판] [VERIFY] 테이블 로드 대기",
"action": "wait_for_table",
"timeout": 10000
},
{
"id": 12,
"name": "[게시판 > 자유게시판] [VERIFY] 삭제 확인",
"action": "evaluate",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;const R={phase:'VERIFY_DELETE'};await w(1000);R.url=location.pathname;R.ts=ts;const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const found=Array.from(rows).find(r=>r.innerText?.includes(ts));R.stillExists=!!found;R.ok=!found;if(found)R.warn='E2E_TEST_ 데이터가 여전히 존재 - 수동 삭제 필요';return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const ts=window.__E2E_TS__||(()=>{try{return sessionStorage.getItem('__E2E_TS__')}catch(e){return null}})()||'E2E_TEST_';const R={phase:'VERIFY_DELETE'};await w(1000);R.url=location.pathname;R.ts=ts;const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const found=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_')&&r.innerText?.includes(ts));R.stillExists=!!found;R.ok=!found;if(found)R.warn='E2E_TEST_ 데이터가 여전히 존재 - 수동 삭제 필요';return JSON.stringify(R);})()",
"timeout": 15000,
"phase": "VERIFY"
}