From 111846476153c5b70d112e4b198e71a295112706 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Thu, 12 Feb 2026 10:06:30 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20Phase=202=20E2E=20=EC=8B=9C=EB=82=98?= =?UTF-8?q?=EB=A6=AC=EC=98=A4=20=EC=B6=94=EA=B0=80=20-=20=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=EC=A7=80=EB=84=A4=EC=9D=B4=EC=85=98/=EC=A0=95?= =?UTF-8?q?=EB=A0=AC,=20=EC=83=88=EB=A1=9C=EA=B3=A0=EC=B9=A8=20=EC=9C=A0?= =?UTF-8?q?=EC=A7=80,=20=EC=97=B0=EC=86=8D=20=EB=93=B1=EB=A1=9D=20(9/9=20P?= =?UTF-8?q?ASS)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - pagination-sort: 회계/판매/인사 테이블 정렬 및 페이지네이션 검증 (3 시나리오) - reload-persist: 자유게시판/어음/입금 데이터 새로고침 후 유지 확인 (3 시나리오) - batch-create: 3건 연속 등록 → 전체 확인 → 전체 삭제 (3 시나리오) --- batch-create-acc-bills.json | 217 ++++++++++++++++++++++++++++++++ batch-create-acc-deposit.json | 217 ++++++++++++++++++++++++++++++++ batch-create-board.json | 217 ++++++++++++++++++++++++++++++++ pagination-sort-acc.json | 142 +++++++++++++++++++++ pagination-sort-hr.json | 98 +++++++++++++++ pagination-sort-sales.json | 142 +++++++++++++++++++++ reload-persist-acc-bills.json | 129 +++++++++++++++++++ reload-persist-acc-deposit.json | 129 +++++++++++++++++++ reload-persist-board.json | 129 +++++++++++++++++++ 9 files changed, 1420 insertions(+) create mode 100644 batch-create-acc-bills.json create mode 100644 batch-create-acc-deposit.json create mode 100644 batch-create-board.json create mode 100644 pagination-sort-acc.json create mode 100644 pagination-sort-hr.json create mode 100644 pagination-sort-sales.json create mode 100644 reload-persist-acc-bills.json create mode 100644 reload-persist-acc-deposit.json create mode 100644 reload-persist-board.json diff --git a/batch-create-acc-bills.json b/batch-create-acc-bills.json new file mode 100644 index 0000000..bbf23e6 --- /dev/null +++ b/batch-create-acc-bills.json @@ -0,0 +1,217 @@ +{ + "id": "batch-create-acc-bills", + "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": "[회계관리 > 어음관리] [CREATE #1] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE_1',ts,n:1};const testId='EB1'+ts.replace(/_/g,'').substring(4,10);R.testId=testId;const btn=Array.from(document.querySelectorAll('button')).find(b=>/어음.*등록|등록/.test(b.innerText?.trim()));if(!btn){R.err='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const numInput=document.querySelector('input[placeholder*=\"어음번호\"]')||Array.from(document.querySelectorAll('input[type=\"text\"]')).find(i=>i.offsetParent!==null&&!i.readOnly&&!i.disabled);if(numInput){sv(numInput,'E2E_BATCH_1_'+testId);await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);for(let i=0;ib.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);for(const db of dateButtons){ db.click();await w(500); const today=document.querySelector('[aria-selected=\"true\"]')||Array.from(document.querySelectorAll('button[name=\"day\"],td button')).find(b=>b.getAttribute('aria-selected')==='true'||b.classList.contains('bg-primary')); if(today){today.click();await w(300);} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(300);}}const noteInput=document.querySelector('input[placeholder*=\"비고\"]');if(noteInput){sv(noteInput,'E2E_BATCH_1_어음_'+ts);await w(200);}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!submitBtn){R.err='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 4, + "name": "[회계관리 > 어음관리] [CREATE #1] 생성 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 5, + "name": "[회계관리 > 어음관리] [CREATE #1] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 6, + "name": "[회계관리 > 어음관리] [CREATE #1] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 7, + "name": "[회계관리 > 어음관리] [CREATE #2] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE_2',ts,n:2};const testId='EB2'+ts.replace(/_/g,'').substring(4,10);R.testId=testId;const btn=Array.from(document.querySelectorAll('button')).find(b=>/어음.*등록|등록/.test(b.innerText?.trim()));if(!btn){R.err='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const numInput=document.querySelector('input[placeholder*=\"어음번호\"]')||Array.from(document.querySelectorAll('input[type=\"text\"]')).find(i=>i.offsetParent!==null&&!i.readOnly&&!i.disabled);if(numInput){sv(numInput,'E2E_BATCH_2_'+testId);await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);for(let i=0;ib.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);for(const db of dateButtons){ db.click();await w(500); const today=document.querySelector('[aria-selected=\"true\"]')||Array.from(document.querySelectorAll('button[name=\"day\"],td button')).find(b=>b.getAttribute('aria-selected')==='true'||b.classList.contains('bg-primary')); if(today){today.click();await w(300);} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(300);}}const noteInput=document.querySelector('input[placeholder*=\"비고\"]');if(noteInput){sv(noteInput,'E2E_BATCH_2_어음_'+ts);await w(200);}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!submitBtn){R.err='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 8, + "name": "[회계관리 > 어음관리] [CREATE #2] 생성 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 9, + "name": "[회계관리 > 어음관리] [CREATE #2] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 10, + "name": "[회계관리 > 어음관리] [CREATE #2] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 11, + "name": "[회계관리 > 어음관리] [CREATE #3] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE_3',ts,n:3};const testId='EB3'+ts.replace(/_/g,'').substring(4,10);R.testId=testId;const btn=Array.from(document.querySelectorAll('button')).find(b=>/어음.*등록|등록/.test(b.innerText?.trim()));if(!btn){R.err='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const numInput=document.querySelector('input[placeholder*=\"어음번호\"]')||Array.from(document.querySelectorAll('input[type=\"text\"]')).find(i=>i.offsetParent!==null&&!i.readOnly&&!i.disabled);if(numInput){sv(numInput,'E2E_BATCH_3_'+testId);await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);for(let i=0;ib.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);for(const db of dateButtons){ db.click();await w(500); const today=document.querySelector('[aria-selected=\"true\"]')||Array.from(document.querySelectorAll('button[name=\"day\"],td button')).find(b=>b.getAttribute('aria-selected')==='true'||b.classList.contains('bg-primary')); if(today){today.click();await w(300);} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(300);}}const noteInput=document.querySelector('input[placeholder*=\"비고\"]');if(noteInput){sv(noteInput,'E2E_BATCH_3_어음_'+ts);await w(200);}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!submitBtn){R.err='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 12, + "name": "[회계관리 > 어음관리] [CREATE #3] 생성 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 13, + "name": "[회계관리 > 어음관리] [CREATE #3] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 14, + "name": "[회계관리 > 어음관리] [CREATE #3] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 15, + "name": "[회계관리 > 어음관리] [VERIFY] 3건 생성 확인", + "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=(()=>{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());})();const R={phase:'VERIFY_BATCH',expected:3};await w(1000);R.url=location.pathname;const rows=Array.from(document.querySelectorAll('table tbody tr'));R.rowCount=rows.length;const batchRows=rows.filter(r=>r.innerText?.includes('E2E_BATCH_'));R.batchCount=batchRows.length;R.countMatch=R.batchCount===3;if(!R.countMatch)R.warn='기대 3건, 실제 '+R.batchCount+'건';R.ok=R.countMatch;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "VERIFY" + }, + { + "id": 16, + "name": "[회계관리 > 어음관리] [DELETE #1] 데이터 삭제", + "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=(()=>{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());})();const R={phase:'DELETE_1'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_BATCH_'));if(!targetRow){R.err='E2E_BATCH_ 데이터 없음';R.ok=false;return JSON.stringify(R);}R.targetText=targetRow.innerText?.substring(0,60);targetRow.click();await w(2500);const delBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='삭제');if(!delBtn){R.err='삭제 버튼 없음';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);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 17, + "name": "[회계관리 > 어음관리] [DELETE #1] 삭제 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 18, + "name": "[회계관리 > 어음관리] [DELETE #1] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 19, + "name": "[회계관리 > 어음관리] [DELETE #1] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 20, + "name": "[회계관리 > 어음관리] [DELETE #2] 데이터 삭제", + "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=(()=>{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());})();const R={phase:'DELETE_2'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_BATCH_'));if(!targetRow){R.err='E2E_BATCH_ 데이터 없음';R.ok=false;return JSON.stringify(R);}R.targetText=targetRow.innerText?.substring(0,60);targetRow.click();await w(2500);const delBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='삭제');if(!delBtn){R.err='삭제 버튼 없음';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);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 21, + "name": "[회계관리 > 어음관리] [DELETE #2] 삭제 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 22, + "name": "[회계관리 > 어음관리] [DELETE #2] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 23, + "name": "[회계관리 > 어음관리] [DELETE #2] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 24, + "name": "[회계관리 > 어음관리] [DELETE #3] 데이터 삭제", + "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=(()=>{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());})();const R={phase:'DELETE_3'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_BATCH_'));if(!targetRow){R.err='E2E_BATCH_ 데이터 없음';R.ok=false;return JSON.stringify(R);}R.targetText=targetRow.innerText?.substring(0,60);targetRow.click();await w(2500);const delBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='삭제');if(!delBtn){R.err='삭제 버튼 없음';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);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 25, + "name": "[회계관리 > 어음관리] [DELETE #3] 삭제 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 26, + "name": "[회계관리 > 어음관리] [DELETE #3] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 27, + "name": "[회계관리 > 어음관리] [DELETE #3] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 28, + "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=(()=>{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());})();const R={phase:'VERIFY_BATCH',expected:0};await w(1000);R.url=location.pathname;const rows=Array.from(document.querySelectorAll('table tbody tr'));R.rowCount=rows.length;const batchRows=rows.filter(r=>r.innerText?.includes('E2E_BATCH_'));R.batchCount=batchRows.length;R.countMatch=R.batchCount===0;if(!R.countMatch)R.warn='기대 0건, 실제 '+R.batchCount+'건';R.ok=R.countMatch;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "VERIFY" + } + ] +} \ No newline at end of file diff --git a/batch-create-acc-deposit.json b/batch-create-acc-deposit.json new file mode 100644 index 0000000..00f6ae0 --- /dev/null +++ b/batch-create-acc-deposit.json @@ -0,0 +1,217 @@ +{ + "id": "batch-create-acc-deposit", + "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": "[회계관리 > 입금관리] [CREATE #1] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE_1',ts,n:1};const btn=Array.from(document.querySelectorAll('button')).find(b=>/입금.*등록|입금등록|등록/.test(b.innerText?.trim()));if(!btn){R.err='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const nameInput=document.querySelector('input[placeholder*=\"입금자명\"]')||document.querySelector('input[placeholder*=\"입금자\"]');if(nameInput){sv(nameInput,'E2E_BATCH_1_입금자_'+ts);await w(200);}const amtInput=document.querySelector('input[placeholder*=\"입금금액\"]')||document.querySelector('input[type=\"number\"]');if(amtInput){sv(amtInput,'100000');await w(200);}const noteInput=document.querySelector('input[placeholder*=\"적요\"]');if(noteInput){sv(noteInput,'E2E_BATCH_1_입금_'+ts);await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);for(const cb of combos){ const label=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||''; if(label.includes('거래처')){ cb.click();await w(600); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(400);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);} break; }}for(const cb of combos){ const label=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||''; if(label.includes('입금 유형')||label.includes('유형')){ cb.click();await w(600); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(400);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);} break; }}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!submitBtn){R.err='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 4, + "name": "[회계관리 > 입금관리] [CREATE #1] 생성 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 5, + "name": "[회계관리 > 입금관리] [CREATE #1] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 6, + "name": "[회계관리 > 입금관리] [CREATE #1] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 7, + "name": "[회계관리 > 입금관리] [CREATE #2] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE_2',ts,n:2};const btn=Array.from(document.querySelectorAll('button')).find(b=>/입금.*등록|입금등록|등록/.test(b.innerText?.trim()));if(!btn){R.err='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const nameInput=document.querySelector('input[placeholder*=\"입금자명\"]')||document.querySelector('input[placeholder*=\"입금자\"]');if(nameInput){sv(nameInput,'E2E_BATCH_2_입금자_'+ts);await w(200);}const amtInput=document.querySelector('input[placeholder*=\"입금금액\"]')||document.querySelector('input[type=\"number\"]');if(amtInput){sv(amtInput,'150000');await w(200);}const noteInput=document.querySelector('input[placeholder*=\"적요\"]');if(noteInput){sv(noteInput,'E2E_BATCH_2_입금_'+ts);await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);for(const cb of combos){ const label=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||''; if(label.includes('거래처')){ cb.click();await w(600); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(400);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);} break; }}for(const cb of combos){ const label=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||''; if(label.includes('입금 유형')||label.includes('유형')){ cb.click();await w(600); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(400);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);} break; }}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!submitBtn){R.err='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 8, + "name": "[회계관리 > 입금관리] [CREATE #2] 생성 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 9, + "name": "[회계관리 > 입금관리] [CREATE #2] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 10, + "name": "[회계관리 > 입금관리] [CREATE #2] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 11, + "name": "[회계관리 > 입금관리] [CREATE #3] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE_3',ts,n:3};const btn=Array.from(document.querySelectorAll('button')).find(b=>/입금.*등록|입금등록|등록/.test(b.innerText?.trim()));if(!btn){R.err='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const nameInput=document.querySelector('input[placeholder*=\"입금자명\"]')||document.querySelector('input[placeholder*=\"입금자\"]');if(nameInput){sv(nameInput,'E2E_BATCH_3_입금자_'+ts);await w(200);}const amtInput=document.querySelector('input[placeholder*=\"입금금액\"]')||document.querySelector('input[type=\"number\"]');if(amtInput){sv(amtInput,'200000');await w(200);}const noteInput=document.querySelector('input[placeholder*=\"적요\"]');if(noteInput){sv(noteInput,'E2E_BATCH_3_입금_'+ts);await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);for(const cb of combos){ const label=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||''; if(label.includes('거래처')){ cb.click();await w(600); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(400);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);} break; }}for(const cb of combos){ const label=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||''; if(label.includes('입금 유형')||label.includes('유형')){ cb.click();await w(600); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(400);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);} break; }}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!submitBtn){R.err='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 12, + "name": "[회계관리 > 입금관리] [CREATE #3] 생성 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 13, + "name": "[회계관리 > 입금관리] [CREATE #3] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 14, + "name": "[회계관리 > 입금관리] [CREATE #3] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 15, + "name": "[회계관리 > 입금관리] [VERIFY] 3건 생성 확인", + "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=(()=>{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());})();const R={phase:'VERIFY_BATCH',expected:3};await w(1000);R.url=location.pathname;const rows=Array.from(document.querySelectorAll('table tbody tr'));R.rowCount=rows.length;const batchRows=rows.filter(r=>r.innerText?.includes('E2E_BATCH_'));R.batchCount=batchRows.length;R.countMatch=R.batchCount===3;if(!R.countMatch)R.warn='기대 3건, 실제 '+R.batchCount+'건';R.ok=R.countMatch;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "VERIFY" + }, + { + "id": 16, + "name": "[회계관리 > 입금관리] [DELETE #1] 데이터 삭제", + "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=(()=>{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());})();const R={phase:'DELETE_1'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_BATCH_'));if(!targetRow){R.err='E2E_BATCH_ 데이터 없음';R.ok=false;return JSON.stringify(R);}R.targetText=targetRow.innerText?.substring(0,60);targetRow.click();await w(2500);const delBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='삭제');if(!delBtn){R.err='삭제 버튼 없음';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);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 17, + "name": "[회계관리 > 입금관리] [DELETE #1] 삭제 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 18, + "name": "[회계관리 > 입금관리] [DELETE #1] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 19, + "name": "[회계관리 > 입금관리] [DELETE #1] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 20, + "name": "[회계관리 > 입금관리] [DELETE #2] 데이터 삭제", + "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=(()=>{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());})();const R={phase:'DELETE_2'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_BATCH_'));if(!targetRow){R.err='E2E_BATCH_ 데이터 없음';R.ok=false;return JSON.stringify(R);}R.targetText=targetRow.innerText?.substring(0,60);targetRow.click();await w(2500);const delBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='삭제');if(!delBtn){R.err='삭제 버튼 없음';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);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 21, + "name": "[회계관리 > 입금관리] [DELETE #2] 삭제 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 22, + "name": "[회계관리 > 입금관리] [DELETE #2] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 23, + "name": "[회계관리 > 입금관리] [DELETE #2] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 24, + "name": "[회계관리 > 입금관리] [DELETE #3] 데이터 삭제", + "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=(()=>{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());})();const R={phase:'DELETE_3'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_BATCH_'));if(!targetRow){R.err='E2E_BATCH_ 데이터 없음';R.ok=false;return JSON.stringify(R);}R.targetText=targetRow.innerText?.substring(0,60);targetRow.click();await w(2500);const delBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='삭제');if(!delBtn){R.err='삭제 버튼 없음';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);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 25, + "name": "[회계관리 > 입금관리] [DELETE #3] 삭제 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 26, + "name": "[회계관리 > 입금관리] [DELETE #3] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 27, + "name": "[회계관리 > 입금관리] [DELETE #3] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 28, + "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=(()=>{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());})();const R={phase:'VERIFY_BATCH',expected:0};await w(1000);R.url=location.pathname;const rows=Array.from(document.querySelectorAll('table tbody tr'));R.rowCount=rows.length;const batchRows=rows.filter(r=>r.innerText?.includes('E2E_BATCH_'));R.batchCount=batchRows.length;R.countMatch=R.batchCount===0;if(!R.countMatch)R.warn='기대 0건, 실제 '+R.batchCount+'건';R.ok=R.countMatch;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "VERIFY" + } + ] +} \ No newline at end of file diff --git a/batch-create-board.json b/batch-create-board.json new file mode 100644 index 0000000..3ea5ffc --- /dev/null +++ b/batch-create-board.json @@ -0,0 +1,217 @@ +{ + "id": "batch-create-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": "[게시판 > 자유게시판] [CREATE #1] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE_1',ts,n:1};const testTitle='E2E_BATCH_1_'+ts;R.testTitle=testTitle;const btn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='글쓰기'||/등록|작성/.test(b.innerText?.trim()));if(!btn){R.err='글쓰기 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const titleInput=document.querySelector('input[placeholder*=\"제목\"]')||document.querySelector('input[type=\"text\"]');if(!titleInput){R.err='제목 입력란 없음';return JSON.stringify(R);}sv(titleInput,testTitle);await w(200);const contentArea=document.querySelector('textarea[placeholder*=\"내용\"]')||document.querySelector('textarea');if(contentArea){sv(contentArea,'E2E 연속 등록 테스트 #1. 자동 삭제 예정.');await w(200);}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록');if(!submitBtn){R.err='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 4, + "name": "[게시판 > 자유게시판] [CREATE #1] 생성 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 5, + "name": "[게시판 > 자유게시판] [CREATE #1] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 6, + "name": "[게시판 > 자유게시판] [CREATE #1] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 7, + "name": "[게시판 > 자유게시판] [CREATE #2] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE_2',ts,n:2};const testTitle='E2E_BATCH_2_'+ts;R.testTitle=testTitle;const btn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='글쓰기'||/등록|작성/.test(b.innerText?.trim()));if(!btn){R.err='글쓰기 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const titleInput=document.querySelector('input[placeholder*=\"제목\"]')||document.querySelector('input[type=\"text\"]');if(!titleInput){R.err='제목 입력란 없음';return JSON.stringify(R);}sv(titleInput,testTitle);await w(200);const contentArea=document.querySelector('textarea[placeholder*=\"내용\"]')||document.querySelector('textarea');if(contentArea){sv(contentArea,'E2E 연속 등록 테스트 #2. 자동 삭제 예정.');await w(200);}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록');if(!submitBtn){R.err='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 8, + "name": "[게시판 > 자유게시판] [CREATE #2] 생성 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 9, + "name": "[게시판 > 자유게시판] [CREATE #2] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 10, + "name": "[게시판 > 자유게시판] [CREATE #2] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 11, + "name": "[게시판 > 자유게시판] [CREATE #3] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE_3',ts,n:3};const testTitle='E2E_BATCH_3_'+ts;R.testTitle=testTitle;const btn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='글쓰기'||/등록|작성/.test(b.innerText?.trim()));if(!btn){R.err='글쓰기 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const titleInput=document.querySelector('input[placeholder*=\"제목\"]')||document.querySelector('input[type=\"text\"]');if(!titleInput){R.err='제목 입력란 없음';return JSON.stringify(R);}sv(titleInput,testTitle);await w(200);const contentArea=document.querySelector('textarea[placeholder*=\"내용\"]')||document.querySelector('textarea');if(contentArea){sv(contentArea,'E2E 연속 등록 테스트 #3. 자동 삭제 예정.');await w(200);}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록');if(!submitBtn){R.err='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 12, + "name": "[게시판 > 자유게시판] [CREATE #3] 생성 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 13, + "name": "[게시판 > 자유게시판] [CREATE #3] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 14, + "name": "[게시판 > 자유게시판] [CREATE #3] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 15, + "name": "[게시판 > 자유게시판] [VERIFY] 3건 생성 확인", + "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=(()=>{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());})();const R={phase:'VERIFY_BATCH',expected:3};await w(1000);R.url=location.pathname;const rows=Array.from(document.querySelectorAll('table tbody tr'));R.rowCount=rows.length;const batchRows=rows.filter(r=>r.innerText?.includes('E2E_BATCH_'));R.batchCount=batchRows.length;R.batchTexts=batchRows.map(r=>r.innerText?.substring(0,60));R.countMatch=R.batchCount===3;if(!R.countMatch)R.warn='기대 3건, 실제 '+R.batchCount+'건';R.ok=R.countMatch;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "VERIFY" + }, + { + "id": 16, + "name": "[게시판 > 자유게시판] [DELETE #1] 데이터 삭제", + "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=(()=>{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());})();const R={phase:'DELETE_1'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_BATCH_'));if(!targetRow){R.err='E2E_BATCH_ 데이터 없음';R.ok=false;return JSON.stringify(R);}R.targetText=targetRow.innerText?.substring(0,60);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.err='삭제 버튼 없음';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);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 17, + "name": "[게시판 > 자유게시판] [DELETE #1] 삭제 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 18, + "name": "[게시판 > 자유게시판] [DELETE #1] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 19, + "name": "[게시판 > 자유게시판] [DELETE #1] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 20, + "name": "[게시판 > 자유게시판] [DELETE #2] 데이터 삭제", + "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=(()=>{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());})();const R={phase:'DELETE_2'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_BATCH_'));if(!targetRow){R.err='E2E_BATCH_ 데이터 없음';R.ok=false;return JSON.stringify(R);}R.targetText=targetRow.innerText?.substring(0,60);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.err='삭제 버튼 없음';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);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 21, + "name": "[게시판 > 자유게시판] [DELETE #2] 삭제 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 22, + "name": "[게시판 > 자유게시판] [DELETE #2] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 23, + "name": "[게시판 > 자유게시판] [DELETE #2] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 24, + "name": "[게시판 > 자유게시판] [DELETE #3] 데이터 삭제", + "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=(()=>{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());})();const R={phase:'DELETE_3'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_BATCH_'));if(!targetRow){R.err='E2E_BATCH_ 데이터 없음';R.ok=false;return JSON.stringify(R);}R.targetText=targetRow.innerText?.substring(0,60);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.err='삭제 버튼 없음';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);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 25, + "name": "[게시판 > 자유게시판] [DELETE #3] 삭제 후 대기", + "action": "wait", + "timeout": 2000 + }, + { + "id": 26, + "name": "[게시판 > 자유게시판] [DELETE #3] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 27, + "name": "[게시판 > 자유게시판] [DELETE #3] 목록 안정화", + "action": "wait", + "timeout": 1500 + }, + { + "id": 28, + "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=(()=>{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());})();const R={phase:'VERIFY_BATCH',expected:0};await w(1000);R.url=location.pathname;const rows=Array.from(document.querySelectorAll('table tbody tr'));R.rowCount=rows.length;const batchRows=rows.filter(r=>r.innerText?.includes('E2E_BATCH_'));R.batchCount=batchRows.length;R.batchTexts=batchRows.map(r=>r.innerText?.substring(0,60));R.countMatch=R.batchCount===0;if(!R.countMatch)R.warn='기대 0건, 실제 '+R.batchCount+'건';R.ok=R.countMatch;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "VERIFY" + } + ] +} \ No newline at end of file diff --git a/pagination-sort-acc.json b/pagination-sort-acc.json new file mode 100644 index 0000000..840e78a --- /dev/null +++ b/pagination-sort-acc.json @@ -0,0 +1,142 @@ +{ + "id": "pagination-sort-acc", + "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:'ROW_COUNT'};const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const pageInfo=document.body.innerText.match(/(\\d+)\\s*[-~]\\s*(\\d+)\\s*(of|중|개|건|/|총)\\s*(\\d+)/i);if(pageInfo){R.pageInfoText=pageInfo[0];R.totalItems=parseInt(pageInfo[4]);}const totalBadge=Array.from(document.querySelectorAll('[class*=\"badge\"],[class*=\"count\"],[class*=\"total\"]')).find(e=>/\\d+/.test(e.innerText));if(totalBadge)R.totalBadgeText=totalBadge.innerText?.trim();const emptyRows=Array.from(rows).filter(r=>r.innerText?.trim().length===0);R.emptyRowCount=emptyRows.length;if(emptyRows.length>0)R.warn='⚠️ 빈 행 '+emptyRows.length+'개 발견 (렌더링 버그 의심)';const rowTexts=Array.from(rows).map(r=>r.innerText?.trim().substring(0,80));const duplicates=rowTexts.filter((t,i)=>rowTexts.indexOf(t)!==i);R.duplicateCount=duplicates.length;if(duplicates.length>0)R.warn=(R.warn||'')+' ⚠️ 중복 행 '+duplicates.length+'개 발견';R.ok=true;return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 4, + "name": "[회계관리 > 어음관리] 컬럼 정렬 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'SORT'};const headers=Array.from(document.querySelectorAll('table thead th,table thead td,[role=\"columnheader\"]'));R.headerCount=headers.length;R.headerTexts=headers.map(h=>h.innerText?.trim()).filter(t=>t).slice(0,10);const sortableHeaders=headers.filter(h=>{ const t=h.innerText?.trim()||''; return t.length>0&&!h.querySelector('input[type=\"checkbox\"]')&&h.offsetParent!==null;});R.sortableCount=sortableHeaders.length;if(sortableHeaders.length===0){R.warn='정렬 가능한 헤더 없음';R.ok=true;return JSON.stringify(R);}const getFirstColValues=()=>Array.from(document.querySelectorAll('table tbody tr')).slice(0,5).map(r=>{const cells=r.querySelectorAll('td');return(cells[1]||cells[0])?.innerText?.trim().substring(0,30)||'';});R.beforeSort=getFirstColValues();const targetHeader=sortableHeaders.find(h=>h.innerText?.trim().length>1)||sortableHeaders[0];R.sortColumn=targetHeader.innerText?.trim();targetHeader.click();await w(1500);R.afterSort1=getFirstColValues();R.sortChanged1=JSON.stringify(R.beforeSort)!==JSON.stringify(R.afterSort1);targetHeader.click();await w(1500);R.afterSort2=getFirstColValues();R.sortChanged2=JSON.stringify(R.afterSort1)!==JSON.stringify(R.afterSort2);if(!R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 컬럼 클릭 후 정렬 변화 없음 (정렬 미구현 의심)';else if(R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 역순 정렬 미동작 (한방향만 정렬)';R.ok=true;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "SORT" + }, + { + "id": 5, + "name": "[회계관리 > 어음관리] 페이지네이션 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'PAGINATION'};const rows1=Array.from(document.querySelectorAll('table tbody tr'));R.page1RowCount=rows1.length;R.page1FirstRow=rows1[0]?.innerText?.substring(0,60)||'';R.page1LastRow=rows1[rows1.length-1]?.innerText?.substring(0,60)||'';const paginationBtns=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).filter(b=>{ const t=b.innerText?.trim()||'';const al=b.getAttribute('aria-label')||''; return(/^[2-9]$|^\\d{2,}$/.test(t)||/next|다음|chevron.?right|›|»|>/.test(t+al+b.className))&&b.offsetParent!==null;});R.paginationBtnCount=paginationBtns.length;const navPagination=document.querySelector('nav[aria-label*=\"pagination\"],nav[aria-label*=\"page\"]');if(navPagination){ const navBtns=Array.from(navPagination.querySelectorAll('button,a')).filter(b=>b.offsetParent!==null); R.navPaginationBtns=navBtns.length;}let nextBtn=paginationBtns.find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return/next|다음|›|»|chevron.?right/i.test(t+b.className);});if(!nextBtn)nextBtn=paginationBtns.find(b=>b.innerText?.trim()==='2');if(!nextBtn&&navPagination){nextBtn=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/next|다음|›|»/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);}R.hasNextBtn=!!nextBtn;if(!nextBtn){R.warn='페이지네이션 버튼 없음 (데이터 부족 또는 미구현)';R.ok=true;return JSON.stringify(R);}nextBtn.click();await w(2000);const rows2=Array.from(document.querySelectorAll('table tbody tr'));R.page2RowCount=rows2.length;R.page2FirstRow=rows2[0]?.innerText?.substring(0,60)||'';R.dataChanged=R.page1FirstRow!==R.page2FirstRow;R.hasRows=R.page2RowCount>0;if(!R.dataChanged&&R.hasRows)R.warn='⚠️ 페이지 변경 후 동일 데이터 표시 (페이지네이션 미동작 의심)';if(!R.hasRows)R.warn='⚠️ 2페이지에 데이터 없음';const prevBtn=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return(/prev|이전|‹|«|chevron.?left/i.test(t+b.className)||b.innerText?.trim()==='1')&&b.offsetParent!==null;});if(!prevBtn&&navPagination){const pb=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/prev|이전|‹|«/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);if(pb)pb.click();}else if(prevBtn){prevBtn.click();}await w(1500);const rows3=Array.from(document.querySelectorAll('table tbody tr'));R.backToPage1=rows3[0]?.innerText?.substring(0,60)===R.page1FirstRow;if(!R.backToPage1)R.warn=(R.warn||'')+' ⚠️ 1페이지 복귀 후 데이터 불일치';R.ok=true;return JSON.stringify(R);})()", + "timeout": 20000, + "phase": "PAGINATION" + }, + { + "id": 6, + "name": "[회계관리 > 입금관리] 메뉴 이동", + "action": "menu_navigate", + "level1": "회계관리", + "level2": "입금관리", + "timeout": 10000 + }, + { + "id": 7, + "name": "[회계관리 > 입금관리] 페이지 로드 대기", + "action": "wait", + "timeout": 3000 + }, + { + "id": 8, + "name": "[회계관리 > 입금관리] 테이블 로드 대기", + "action": "wait_for_table", + "timeout": 5000 + }, + { + "id": 9, + "name": "[회계관리 > 입금관리] 행 수/중복 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'ROW_COUNT'};const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const pageInfo=document.body.innerText.match(/(\\d+)\\s*[-~]\\s*(\\d+)\\s*(of|중|개|건|/|총)\\s*(\\d+)/i);if(pageInfo){R.pageInfoText=pageInfo[0];R.totalItems=parseInt(pageInfo[4]);}const totalBadge=Array.from(document.querySelectorAll('[class*=\"badge\"],[class*=\"count\"],[class*=\"total\"]')).find(e=>/\\d+/.test(e.innerText));if(totalBadge)R.totalBadgeText=totalBadge.innerText?.trim();const emptyRows=Array.from(rows).filter(r=>r.innerText?.trim().length===0);R.emptyRowCount=emptyRows.length;if(emptyRows.length>0)R.warn='⚠️ 빈 행 '+emptyRows.length+'개 발견 (렌더링 버그 의심)';const rowTexts=Array.from(rows).map(r=>r.innerText?.trim().substring(0,80));const duplicates=rowTexts.filter((t,i)=>rowTexts.indexOf(t)!==i);R.duplicateCount=duplicates.length;if(duplicates.length>0)R.warn=(R.warn||'')+' ⚠️ 중복 행 '+duplicates.length+'개 발견';R.ok=true;return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 10, + "name": "[회계관리 > 입금관리] 컬럼 정렬 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'SORT'};const headers=Array.from(document.querySelectorAll('table thead th,table thead td,[role=\"columnheader\"]'));R.headerCount=headers.length;R.headerTexts=headers.map(h=>h.innerText?.trim()).filter(t=>t).slice(0,10);const sortableHeaders=headers.filter(h=>{ const t=h.innerText?.trim()||''; return t.length>0&&!h.querySelector('input[type=\"checkbox\"]')&&h.offsetParent!==null;});R.sortableCount=sortableHeaders.length;if(sortableHeaders.length===0){R.warn='정렬 가능한 헤더 없음';R.ok=true;return JSON.stringify(R);}const getFirstColValues=()=>Array.from(document.querySelectorAll('table tbody tr')).slice(0,5).map(r=>{const cells=r.querySelectorAll('td');return(cells[1]||cells[0])?.innerText?.trim().substring(0,30)||'';});R.beforeSort=getFirstColValues();const targetHeader=sortableHeaders.find(h=>h.innerText?.trim().length>1)||sortableHeaders[0];R.sortColumn=targetHeader.innerText?.trim();targetHeader.click();await w(1500);R.afterSort1=getFirstColValues();R.sortChanged1=JSON.stringify(R.beforeSort)!==JSON.stringify(R.afterSort1);targetHeader.click();await w(1500);R.afterSort2=getFirstColValues();R.sortChanged2=JSON.stringify(R.afterSort1)!==JSON.stringify(R.afterSort2);if(!R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 컬럼 클릭 후 정렬 변화 없음 (정렬 미구현 의심)';else if(R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 역순 정렬 미동작 (한방향만 정렬)';R.ok=true;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "SORT" + }, + { + "id": 11, + "name": "[회계관리 > 입금관리] 페이지네이션 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'PAGINATION'};const rows1=Array.from(document.querySelectorAll('table tbody tr'));R.page1RowCount=rows1.length;R.page1FirstRow=rows1[0]?.innerText?.substring(0,60)||'';R.page1LastRow=rows1[rows1.length-1]?.innerText?.substring(0,60)||'';const paginationBtns=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).filter(b=>{ const t=b.innerText?.trim()||'';const al=b.getAttribute('aria-label')||''; return(/^[2-9]$|^\\d{2,}$/.test(t)||/next|다음|chevron.?right|›|»|>/.test(t+al+b.className))&&b.offsetParent!==null;});R.paginationBtnCount=paginationBtns.length;const navPagination=document.querySelector('nav[aria-label*=\"pagination\"],nav[aria-label*=\"page\"]');if(navPagination){ const navBtns=Array.from(navPagination.querySelectorAll('button,a')).filter(b=>b.offsetParent!==null); R.navPaginationBtns=navBtns.length;}let nextBtn=paginationBtns.find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return/next|다음|›|»|chevron.?right/i.test(t+b.className);});if(!nextBtn)nextBtn=paginationBtns.find(b=>b.innerText?.trim()==='2');if(!nextBtn&&navPagination){nextBtn=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/next|다음|›|»/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);}R.hasNextBtn=!!nextBtn;if(!nextBtn){R.warn='페이지네이션 버튼 없음 (데이터 부족 또는 미구현)';R.ok=true;return JSON.stringify(R);}nextBtn.click();await w(2000);const rows2=Array.from(document.querySelectorAll('table tbody tr'));R.page2RowCount=rows2.length;R.page2FirstRow=rows2[0]?.innerText?.substring(0,60)||'';R.dataChanged=R.page1FirstRow!==R.page2FirstRow;R.hasRows=R.page2RowCount>0;if(!R.dataChanged&&R.hasRows)R.warn='⚠️ 페이지 변경 후 동일 데이터 표시 (페이지네이션 미동작 의심)';if(!R.hasRows)R.warn='⚠️ 2페이지에 데이터 없음';const prevBtn=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return(/prev|이전|‹|«|chevron.?left/i.test(t+b.className)||b.innerText?.trim()==='1')&&b.offsetParent!==null;});if(!prevBtn&&navPagination){const pb=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/prev|이전|‹|«/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);if(pb)pb.click();}else if(prevBtn){prevBtn.click();}await w(1500);const rows3=Array.from(document.querySelectorAll('table tbody tr'));R.backToPage1=rows3[0]?.innerText?.substring(0,60)===R.page1FirstRow;if(!R.backToPage1)R.warn=(R.warn||'')+' ⚠️ 1페이지 복귀 후 데이터 불일치';R.ok=true;return JSON.stringify(R);})()", + "timeout": 20000, + "phase": "PAGINATION" + }, + { + "id": 12, + "name": "[회계관리 > 거래처관리] 메뉴 이동", + "action": "menu_navigate", + "level1": "회계관리", + "level2": "거래처관리", + "timeout": 10000 + }, + { + "id": 13, + "name": "[회계관리 > 거래처관리] 페이지 로드 대기", + "action": "wait", + "timeout": 3000 + }, + { + "id": 14, + "name": "[회계관리 > 거래처관리] 테이블 로드 대기", + "action": "wait_for_table", + "timeout": 5000 + }, + { + "id": 15, + "name": "[회계관리 > 거래처관리] 행 수/중복 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'ROW_COUNT'};const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const pageInfo=document.body.innerText.match(/(\\d+)\\s*[-~]\\s*(\\d+)\\s*(of|중|개|건|/|총)\\s*(\\d+)/i);if(pageInfo){R.pageInfoText=pageInfo[0];R.totalItems=parseInt(pageInfo[4]);}const totalBadge=Array.from(document.querySelectorAll('[class*=\"badge\"],[class*=\"count\"],[class*=\"total\"]')).find(e=>/\\d+/.test(e.innerText));if(totalBadge)R.totalBadgeText=totalBadge.innerText?.trim();const emptyRows=Array.from(rows).filter(r=>r.innerText?.trim().length===0);R.emptyRowCount=emptyRows.length;if(emptyRows.length>0)R.warn='⚠️ 빈 행 '+emptyRows.length+'개 발견 (렌더링 버그 의심)';const rowTexts=Array.from(rows).map(r=>r.innerText?.trim().substring(0,80));const duplicates=rowTexts.filter((t,i)=>rowTexts.indexOf(t)!==i);R.duplicateCount=duplicates.length;if(duplicates.length>0)R.warn=(R.warn||'')+' ⚠️ 중복 행 '+duplicates.length+'개 발견';R.ok=true;return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 16, + "name": "[회계관리 > 거래처관리] 컬럼 정렬 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'SORT'};const headers=Array.from(document.querySelectorAll('table thead th,table thead td,[role=\"columnheader\"]'));R.headerCount=headers.length;R.headerTexts=headers.map(h=>h.innerText?.trim()).filter(t=>t).slice(0,10);const sortableHeaders=headers.filter(h=>{ const t=h.innerText?.trim()||''; return t.length>0&&!h.querySelector('input[type=\"checkbox\"]')&&h.offsetParent!==null;});R.sortableCount=sortableHeaders.length;if(sortableHeaders.length===0){R.warn='정렬 가능한 헤더 없음';R.ok=true;return JSON.stringify(R);}const getFirstColValues=()=>Array.from(document.querySelectorAll('table tbody tr')).slice(0,5).map(r=>{const cells=r.querySelectorAll('td');return(cells[1]||cells[0])?.innerText?.trim().substring(0,30)||'';});R.beforeSort=getFirstColValues();const targetHeader=sortableHeaders.find(h=>h.innerText?.trim().length>1)||sortableHeaders[0];R.sortColumn=targetHeader.innerText?.trim();targetHeader.click();await w(1500);R.afterSort1=getFirstColValues();R.sortChanged1=JSON.stringify(R.beforeSort)!==JSON.stringify(R.afterSort1);targetHeader.click();await w(1500);R.afterSort2=getFirstColValues();R.sortChanged2=JSON.stringify(R.afterSort1)!==JSON.stringify(R.afterSort2);if(!R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 컬럼 클릭 후 정렬 변화 없음 (정렬 미구현 의심)';else if(R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 역순 정렬 미동작 (한방향만 정렬)';R.ok=true;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "SORT" + }, + { + "id": 17, + "name": "[회계관리 > 거래처관리] 페이지네이션 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'PAGINATION'};const rows1=Array.from(document.querySelectorAll('table tbody tr'));R.page1RowCount=rows1.length;R.page1FirstRow=rows1[0]?.innerText?.substring(0,60)||'';R.page1LastRow=rows1[rows1.length-1]?.innerText?.substring(0,60)||'';const paginationBtns=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).filter(b=>{ const t=b.innerText?.trim()||'';const al=b.getAttribute('aria-label')||''; return(/^[2-9]$|^\\d{2,}$/.test(t)||/next|다음|chevron.?right|›|»|>/.test(t+al+b.className))&&b.offsetParent!==null;});R.paginationBtnCount=paginationBtns.length;const navPagination=document.querySelector('nav[aria-label*=\"pagination\"],nav[aria-label*=\"page\"]');if(navPagination){ const navBtns=Array.from(navPagination.querySelectorAll('button,a')).filter(b=>b.offsetParent!==null); R.navPaginationBtns=navBtns.length;}let nextBtn=paginationBtns.find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return/next|다음|›|»|chevron.?right/i.test(t+b.className);});if(!nextBtn)nextBtn=paginationBtns.find(b=>b.innerText?.trim()==='2');if(!nextBtn&&navPagination){nextBtn=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/next|다음|›|»/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);}R.hasNextBtn=!!nextBtn;if(!nextBtn){R.warn='페이지네이션 버튼 없음 (데이터 부족 또는 미구현)';R.ok=true;return JSON.stringify(R);}nextBtn.click();await w(2000);const rows2=Array.from(document.querySelectorAll('table tbody tr'));R.page2RowCount=rows2.length;R.page2FirstRow=rows2[0]?.innerText?.substring(0,60)||'';R.dataChanged=R.page1FirstRow!==R.page2FirstRow;R.hasRows=R.page2RowCount>0;if(!R.dataChanged&&R.hasRows)R.warn='⚠️ 페이지 변경 후 동일 데이터 표시 (페이지네이션 미동작 의심)';if(!R.hasRows)R.warn='⚠️ 2페이지에 데이터 없음';const prevBtn=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return(/prev|이전|‹|«|chevron.?left/i.test(t+b.className)||b.innerText?.trim()==='1')&&b.offsetParent!==null;});if(!prevBtn&&navPagination){const pb=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/prev|이전|‹|«/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);if(pb)pb.click();}else if(prevBtn){prevBtn.click();}await w(1500);const rows3=Array.from(document.querySelectorAll('table tbody tr'));R.backToPage1=rows3[0]?.innerText?.substring(0,60)===R.page1FirstRow;if(!R.backToPage1)R.warn=(R.warn||'')+' ⚠️ 1페이지 복귀 후 데이터 불일치';R.ok=true;return JSON.stringify(R);})()", + "timeout": 20000, + "phase": "PAGINATION" + } + ] +} \ No newline at end of file diff --git a/pagination-sort-hr.json b/pagination-sort-hr.json new file mode 100644 index 0000000..1158749 --- /dev/null +++ b/pagination-sort-hr.json @@ -0,0 +1,98 @@ +{ + "id": "pagination-sort-hr", + "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:'ROW_COUNT'};const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const pageInfo=document.body.innerText.match(/(\\d+)\\s*[-~]\\s*(\\d+)\\s*(of|중|개|건|/|총)\\s*(\\d+)/i);if(pageInfo){R.pageInfoText=pageInfo[0];R.totalItems=parseInt(pageInfo[4]);}const totalBadge=Array.from(document.querySelectorAll('[class*=\"badge\"],[class*=\"count\"],[class*=\"total\"]')).find(e=>/\\d+/.test(e.innerText));if(totalBadge)R.totalBadgeText=totalBadge.innerText?.trim();const emptyRows=Array.from(rows).filter(r=>r.innerText?.trim().length===0);R.emptyRowCount=emptyRows.length;if(emptyRows.length>0)R.warn='⚠️ 빈 행 '+emptyRows.length+'개 발견 (렌더링 버그 의심)';const rowTexts=Array.from(rows).map(r=>r.innerText?.trim().substring(0,80));const duplicates=rowTexts.filter((t,i)=>rowTexts.indexOf(t)!==i);R.duplicateCount=duplicates.length;if(duplicates.length>0)R.warn=(R.warn||'')+' ⚠️ 중복 행 '+duplicates.length+'개 발견';R.ok=true;return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 4, + "name": "[인사관리 > 사원관리] 컬럼 정렬 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'SORT'};const headers=Array.from(document.querySelectorAll('table thead th,table thead td,[role=\"columnheader\"]'));R.headerCount=headers.length;R.headerTexts=headers.map(h=>h.innerText?.trim()).filter(t=>t).slice(0,10);const sortableHeaders=headers.filter(h=>{ const t=h.innerText?.trim()||''; return t.length>0&&!h.querySelector('input[type=\"checkbox\"]')&&h.offsetParent!==null;});R.sortableCount=sortableHeaders.length;if(sortableHeaders.length===0){R.warn='정렬 가능한 헤더 없음';R.ok=true;return JSON.stringify(R);}const getFirstColValues=()=>Array.from(document.querySelectorAll('table tbody tr')).slice(0,5).map(r=>{const cells=r.querySelectorAll('td');return(cells[1]||cells[0])?.innerText?.trim().substring(0,30)||'';});R.beforeSort=getFirstColValues();const targetHeader=sortableHeaders.find(h=>h.innerText?.trim().length>1)||sortableHeaders[0];R.sortColumn=targetHeader.innerText?.trim();targetHeader.click();await w(1500);R.afterSort1=getFirstColValues();R.sortChanged1=JSON.stringify(R.beforeSort)!==JSON.stringify(R.afterSort1);targetHeader.click();await w(1500);R.afterSort2=getFirstColValues();R.sortChanged2=JSON.stringify(R.afterSort1)!==JSON.stringify(R.afterSort2);if(!R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 컬럼 클릭 후 정렬 변화 없음 (정렬 미구현 의심)';else if(R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 역순 정렬 미동작 (한방향만 정렬)';R.ok=true;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "SORT" + }, + { + "id": 5, + "name": "[인사관리 > 사원관리] 페이지네이션 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'PAGINATION'};const rows1=Array.from(document.querySelectorAll('table tbody tr'));R.page1RowCount=rows1.length;R.page1FirstRow=rows1[0]?.innerText?.substring(0,60)||'';R.page1LastRow=rows1[rows1.length-1]?.innerText?.substring(0,60)||'';const paginationBtns=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).filter(b=>{ const t=b.innerText?.trim()||'';const al=b.getAttribute('aria-label')||''; return(/^[2-9]$|^\\d{2,}$/.test(t)||/next|다음|chevron.?right|›|»|>/.test(t+al+b.className))&&b.offsetParent!==null;});R.paginationBtnCount=paginationBtns.length;const navPagination=document.querySelector('nav[aria-label*=\"pagination\"],nav[aria-label*=\"page\"]');if(navPagination){ const navBtns=Array.from(navPagination.querySelectorAll('button,a')).filter(b=>b.offsetParent!==null); R.navPaginationBtns=navBtns.length;}let nextBtn=paginationBtns.find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return/next|다음|›|»|chevron.?right/i.test(t+b.className);});if(!nextBtn)nextBtn=paginationBtns.find(b=>b.innerText?.trim()==='2');if(!nextBtn&&navPagination){nextBtn=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/next|다음|›|»/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);}R.hasNextBtn=!!nextBtn;if(!nextBtn){R.warn='페이지네이션 버튼 없음 (데이터 부족 또는 미구현)';R.ok=true;return JSON.stringify(R);}nextBtn.click();await w(2000);const rows2=Array.from(document.querySelectorAll('table tbody tr'));R.page2RowCount=rows2.length;R.page2FirstRow=rows2[0]?.innerText?.substring(0,60)||'';R.dataChanged=R.page1FirstRow!==R.page2FirstRow;R.hasRows=R.page2RowCount>0;if(!R.dataChanged&&R.hasRows)R.warn='⚠️ 페이지 변경 후 동일 데이터 표시 (페이지네이션 미동작 의심)';if(!R.hasRows)R.warn='⚠️ 2페이지에 데이터 없음';const prevBtn=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return(/prev|이전|‹|«|chevron.?left/i.test(t+b.className)||b.innerText?.trim()==='1')&&b.offsetParent!==null;});if(!prevBtn&&navPagination){const pb=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/prev|이전|‹|«/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);if(pb)pb.click();}else if(prevBtn){prevBtn.click();}await w(1500);const rows3=Array.from(document.querySelectorAll('table tbody tr'));R.backToPage1=rows3[0]?.innerText?.substring(0,60)===R.page1FirstRow;if(!R.backToPage1)R.warn=(R.warn||'')+' ⚠️ 1페이지 복귀 후 데이터 불일치';R.ok=true;return JSON.stringify(R);})()", + "timeout": 20000, + "phase": "PAGINATION" + }, + { + "id": 6, + "name": "[게시판 > 자유게시판] 메뉴 이동", + "action": "menu_navigate", + "level1": "게시판", + "level2": "자유게시판", + "timeout": 10000 + }, + { + "id": 7, + "name": "[게시판 > 자유게시판] 페이지 로드 대기", + "action": "wait", + "timeout": 3000 + }, + { + "id": 8, + "name": "[게시판 > 자유게시판] 테이블 로드 대기", + "action": "wait_for_table", + "timeout": 5000 + }, + { + "id": 9, + "name": "[게시판 > 자유게시판] 행 수/중복 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'ROW_COUNT'};const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const pageInfo=document.body.innerText.match(/(\\d+)\\s*[-~]\\s*(\\d+)\\s*(of|중|개|건|/|총)\\s*(\\d+)/i);if(pageInfo){R.pageInfoText=pageInfo[0];R.totalItems=parseInt(pageInfo[4]);}const totalBadge=Array.from(document.querySelectorAll('[class*=\"badge\"],[class*=\"count\"],[class*=\"total\"]')).find(e=>/\\d+/.test(e.innerText));if(totalBadge)R.totalBadgeText=totalBadge.innerText?.trim();const emptyRows=Array.from(rows).filter(r=>r.innerText?.trim().length===0);R.emptyRowCount=emptyRows.length;if(emptyRows.length>0)R.warn='⚠️ 빈 행 '+emptyRows.length+'개 발견 (렌더링 버그 의심)';const rowTexts=Array.from(rows).map(r=>r.innerText?.trim().substring(0,80));const duplicates=rowTexts.filter((t,i)=>rowTexts.indexOf(t)!==i);R.duplicateCount=duplicates.length;if(duplicates.length>0)R.warn=(R.warn||'')+' ⚠️ 중복 행 '+duplicates.length+'개 발견';R.ok=true;return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 10, + "name": "[게시판 > 자유게시판] 컬럼 정렬 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'SORT'};const headers=Array.from(document.querySelectorAll('table thead th,table thead td,[role=\"columnheader\"]'));R.headerCount=headers.length;R.headerTexts=headers.map(h=>h.innerText?.trim()).filter(t=>t).slice(0,10);const sortableHeaders=headers.filter(h=>{ const t=h.innerText?.trim()||''; return t.length>0&&!h.querySelector('input[type=\"checkbox\"]')&&h.offsetParent!==null;});R.sortableCount=sortableHeaders.length;if(sortableHeaders.length===0){R.warn='정렬 가능한 헤더 없음';R.ok=true;return JSON.stringify(R);}const getFirstColValues=()=>Array.from(document.querySelectorAll('table tbody tr')).slice(0,5).map(r=>{const cells=r.querySelectorAll('td');return(cells[1]||cells[0])?.innerText?.trim().substring(0,30)||'';});R.beforeSort=getFirstColValues();const targetHeader=sortableHeaders.find(h=>h.innerText?.trim().length>1)||sortableHeaders[0];R.sortColumn=targetHeader.innerText?.trim();targetHeader.click();await w(1500);R.afterSort1=getFirstColValues();R.sortChanged1=JSON.stringify(R.beforeSort)!==JSON.stringify(R.afterSort1);targetHeader.click();await w(1500);R.afterSort2=getFirstColValues();R.sortChanged2=JSON.stringify(R.afterSort1)!==JSON.stringify(R.afterSort2);if(!R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 컬럼 클릭 후 정렬 변화 없음 (정렬 미구현 의심)';else if(R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 역순 정렬 미동작 (한방향만 정렬)';R.ok=true;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "SORT" + }, + { + "id": 11, + "name": "[게시판 > 자유게시판] 페이지네이션 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'PAGINATION'};const rows1=Array.from(document.querySelectorAll('table tbody tr'));R.page1RowCount=rows1.length;R.page1FirstRow=rows1[0]?.innerText?.substring(0,60)||'';R.page1LastRow=rows1[rows1.length-1]?.innerText?.substring(0,60)||'';const paginationBtns=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).filter(b=>{ const t=b.innerText?.trim()||'';const al=b.getAttribute('aria-label')||''; return(/^[2-9]$|^\\d{2,}$/.test(t)||/next|다음|chevron.?right|›|»|>/.test(t+al+b.className))&&b.offsetParent!==null;});R.paginationBtnCount=paginationBtns.length;const navPagination=document.querySelector('nav[aria-label*=\"pagination\"],nav[aria-label*=\"page\"]');if(navPagination){ const navBtns=Array.from(navPagination.querySelectorAll('button,a')).filter(b=>b.offsetParent!==null); R.navPaginationBtns=navBtns.length;}let nextBtn=paginationBtns.find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return/next|다음|›|»|chevron.?right/i.test(t+b.className);});if(!nextBtn)nextBtn=paginationBtns.find(b=>b.innerText?.trim()==='2');if(!nextBtn&&navPagination){nextBtn=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/next|다음|›|»/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);}R.hasNextBtn=!!nextBtn;if(!nextBtn){R.warn='페이지네이션 버튼 없음 (데이터 부족 또는 미구현)';R.ok=true;return JSON.stringify(R);}nextBtn.click();await w(2000);const rows2=Array.from(document.querySelectorAll('table tbody tr'));R.page2RowCount=rows2.length;R.page2FirstRow=rows2[0]?.innerText?.substring(0,60)||'';R.dataChanged=R.page1FirstRow!==R.page2FirstRow;R.hasRows=R.page2RowCount>0;if(!R.dataChanged&&R.hasRows)R.warn='⚠️ 페이지 변경 후 동일 데이터 표시 (페이지네이션 미동작 의심)';if(!R.hasRows)R.warn='⚠️ 2페이지에 데이터 없음';const prevBtn=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return(/prev|이전|‹|«|chevron.?left/i.test(t+b.className)||b.innerText?.trim()==='1')&&b.offsetParent!==null;});if(!prevBtn&&navPagination){const pb=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/prev|이전|‹|«/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);if(pb)pb.click();}else if(prevBtn){prevBtn.click();}await w(1500);const rows3=Array.from(document.querySelectorAll('table tbody tr'));R.backToPage1=rows3[0]?.innerText?.substring(0,60)===R.page1FirstRow;if(!R.backToPage1)R.warn=(R.warn||'')+' ⚠️ 1페이지 복귀 후 데이터 불일치';R.ok=true;return JSON.stringify(R);})()", + "timeout": 20000, + "phase": "PAGINATION" + } + ] +} \ No newline at end of file diff --git a/pagination-sort-sales.json b/pagination-sort-sales.json new file mode 100644 index 0000000..8bf9338 --- /dev/null +++ b/pagination-sort-sales.json @@ -0,0 +1,142 @@ +{ + "id": "pagination-sort-sales", + "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:'ROW_COUNT'};const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const pageInfo=document.body.innerText.match(/(\\d+)\\s*[-~]\\s*(\\d+)\\s*(of|중|개|건|/|총)\\s*(\\d+)/i);if(pageInfo){R.pageInfoText=pageInfo[0];R.totalItems=parseInt(pageInfo[4]);}const totalBadge=Array.from(document.querySelectorAll('[class*=\"badge\"],[class*=\"count\"],[class*=\"total\"]')).find(e=>/\\d+/.test(e.innerText));if(totalBadge)R.totalBadgeText=totalBadge.innerText?.trim();const emptyRows=Array.from(rows).filter(r=>r.innerText?.trim().length===0);R.emptyRowCount=emptyRows.length;if(emptyRows.length>0)R.warn='⚠️ 빈 행 '+emptyRows.length+'개 발견 (렌더링 버그 의심)';const rowTexts=Array.from(rows).map(r=>r.innerText?.trim().substring(0,80));const duplicates=rowTexts.filter((t,i)=>rowTexts.indexOf(t)!==i);R.duplicateCount=duplicates.length;if(duplicates.length>0)R.warn=(R.warn||'')+' ⚠️ 중복 행 '+duplicates.length+'개 발견';R.ok=true;return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 4, + "name": "[판매관리 > 거래처관리] 컬럼 정렬 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'SORT'};const headers=Array.from(document.querySelectorAll('table thead th,table thead td,[role=\"columnheader\"]'));R.headerCount=headers.length;R.headerTexts=headers.map(h=>h.innerText?.trim()).filter(t=>t).slice(0,10);const sortableHeaders=headers.filter(h=>{ const t=h.innerText?.trim()||''; return t.length>0&&!h.querySelector('input[type=\"checkbox\"]')&&h.offsetParent!==null;});R.sortableCount=sortableHeaders.length;if(sortableHeaders.length===0){R.warn='정렬 가능한 헤더 없음';R.ok=true;return JSON.stringify(R);}const getFirstColValues=()=>Array.from(document.querySelectorAll('table tbody tr')).slice(0,5).map(r=>{const cells=r.querySelectorAll('td');return(cells[1]||cells[0])?.innerText?.trim().substring(0,30)||'';});R.beforeSort=getFirstColValues();const targetHeader=sortableHeaders.find(h=>h.innerText?.trim().length>1)||sortableHeaders[0];R.sortColumn=targetHeader.innerText?.trim();targetHeader.click();await w(1500);R.afterSort1=getFirstColValues();R.sortChanged1=JSON.stringify(R.beforeSort)!==JSON.stringify(R.afterSort1);targetHeader.click();await w(1500);R.afterSort2=getFirstColValues();R.sortChanged2=JSON.stringify(R.afterSort1)!==JSON.stringify(R.afterSort2);if(!R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 컬럼 클릭 후 정렬 변화 없음 (정렬 미구현 의심)';else if(R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 역순 정렬 미동작 (한방향만 정렬)';R.ok=true;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "SORT" + }, + { + "id": 5, + "name": "[판매관리 > 거래처관리] 페이지네이션 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'PAGINATION'};const rows1=Array.from(document.querySelectorAll('table tbody tr'));R.page1RowCount=rows1.length;R.page1FirstRow=rows1[0]?.innerText?.substring(0,60)||'';R.page1LastRow=rows1[rows1.length-1]?.innerText?.substring(0,60)||'';const paginationBtns=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).filter(b=>{ const t=b.innerText?.trim()||'';const al=b.getAttribute('aria-label')||''; return(/^[2-9]$|^\\d{2,}$/.test(t)||/next|다음|chevron.?right|›|»|>/.test(t+al+b.className))&&b.offsetParent!==null;});R.paginationBtnCount=paginationBtns.length;const navPagination=document.querySelector('nav[aria-label*=\"pagination\"],nav[aria-label*=\"page\"]');if(navPagination){ const navBtns=Array.from(navPagination.querySelectorAll('button,a')).filter(b=>b.offsetParent!==null); R.navPaginationBtns=navBtns.length;}let nextBtn=paginationBtns.find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return/next|다음|›|»|chevron.?right/i.test(t+b.className);});if(!nextBtn)nextBtn=paginationBtns.find(b=>b.innerText?.trim()==='2');if(!nextBtn&&navPagination){nextBtn=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/next|다음|›|»/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);}R.hasNextBtn=!!nextBtn;if(!nextBtn){R.warn='페이지네이션 버튼 없음 (데이터 부족 또는 미구현)';R.ok=true;return JSON.stringify(R);}nextBtn.click();await w(2000);const rows2=Array.from(document.querySelectorAll('table tbody tr'));R.page2RowCount=rows2.length;R.page2FirstRow=rows2[0]?.innerText?.substring(0,60)||'';R.dataChanged=R.page1FirstRow!==R.page2FirstRow;R.hasRows=R.page2RowCount>0;if(!R.dataChanged&&R.hasRows)R.warn='⚠️ 페이지 변경 후 동일 데이터 표시 (페이지네이션 미동작 의심)';if(!R.hasRows)R.warn='⚠️ 2페이지에 데이터 없음';const prevBtn=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return(/prev|이전|‹|«|chevron.?left/i.test(t+b.className)||b.innerText?.trim()==='1')&&b.offsetParent!==null;});if(!prevBtn&&navPagination){const pb=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/prev|이전|‹|«/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);if(pb)pb.click();}else if(prevBtn){prevBtn.click();}await w(1500);const rows3=Array.from(document.querySelectorAll('table tbody tr'));R.backToPage1=rows3[0]?.innerText?.substring(0,60)===R.page1FirstRow;if(!R.backToPage1)R.warn=(R.warn||'')+' ⚠️ 1페이지 복귀 후 데이터 불일치';R.ok=true;return JSON.stringify(R);})()", + "timeout": 20000, + "phase": "PAGINATION" + }, + { + "id": 6, + "name": "[판매관리 > 수주관리] 메뉴 이동", + "action": "menu_navigate", + "level1": "판매관리", + "level2": "수주관리", + "timeout": 10000 + }, + { + "id": 7, + "name": "[판매관리 > 수주관리] 페이지 로드 대기", + "action": "wait", + "timeout": 3000 + }, + { + "id": 8, + "name": "[판매관리 > 수주관리] 테이블 로드 대기", + "action": "wait_for_table", + "timeout": 5000 + }, + { + "id": 9, + "name": "[판매관리 > 수주관리] 행 수/중복 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'ROW_COUNT'};const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const pageInfo=document.body.innerText.match(/(\\d+)\\s*[-~]\\s*(\\d+)\\s*(of|중|개|건|/|총)\\s*(\\d+)/i);if(pageInfo){R.pageInfoText=pageInfo[0];R.totalItems=parseInt(pageInfo[4]);}const totalBadge=Array.from(document.querySelectorAll('[class*=\"badge\"],[class*=\"count\"],[class*=\"total\"]')).find(e=>/\\d+/.test(e.innerText));if(totalBadge)R.totalBadgeText=totalBadge.innerText?.trim();const emptyRows=Array.from(rows).filter(r=>r.innerText?.trim().length===0);R.emptyRowCount=emptyRows.length;if(emptyRows.length>0)R.warn='⚠️ 빈 행 '+emptyRows.length+'개 발견 (렌더링 버그 의심)';const rowTexts=Array.from(rows).map(r=>r.innerText?.trim().substring(0,80));const duplicates=rowTexts.filter((t,i)=>rowTexts.indexOf(t)!==i);R.duplicateCount=duplicates.length;if(duplicates.length>0)R.warn=(R.warn||'')+' ⚠️ 중복 행 '+duplicates.length+'개 발견';R.ok=true;return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 10, + "name": "[판매관리 > 수주관리] 컬럼 정렬 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'SORT'};const headers=Array.from(document.querySelectorAll('table thead th,table thead td,[role=\"columnheader\"]'));R.headerCount=headers.length;R.headerTexts=headers.map(h=>h.innerText?.trim()).filter(t=>t).slice(0,10);const sortableHeaders=headers.filter(h=>{ const t=h.innerText?.trim()||''; return t.length>0&&!h.querySelector('input[type=\"checkbox\"]')&&h.offsetParent!==null;});R.sortableCount=sortableHeaders.length;if(sortableHeaders.length===0){R.warn='정렬 가능한 헤더 없음';R.ok=true;return JSON.stringify(R);}const getFirstColValues=()=>Array.from(document.querySelectorAll('table tbody tr')).slice(0,5).map(r=>{const cells=r.querySelectorAll('td');return(cells[1]||cells[0])?.innerText?.trim().substring(0,30)||'';});R.beforeSort=getFirstColValues();const targetHeader=sortableHeaders.find(h=>h.innerText?.trim().length>1)||sortableHeaders[0];R.sortColumn=targetHeader.innerText?.trim();targetHeader.click();await w(1500);R.afterSort1=getFirstColValues();R.sortChanged1=JSON.stringify(R.beforeSort)!==JSON.stringify(R.afterSort1);targetHeader.click();await w(1500);R.afterSort2=getFirstColValues();R.sortChanged2=JSON.stringify(R.afterSort1)!==JSON.stringify(R.afterSort2);if(!R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 컬럼 클릭 후 정렬 변화 없음 (정렬 미구현 의심)';else if(R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 역순 정렬 미동작 (한방향만 정렬)';R.ok=true;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "SORT" + }, + { + "id": 11, + "name": "[판매관리 > 수주관리] 페이지네이션 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'PAGINATION'};const rows1=Array.from(document.querySelectorAll('table tbody tr'));R.page1RowCount=rows1.length;R.page1FirstRow=rows1[0]?.innerText?.substring(0,60)||'';R.page1LastRow=rows1[rows1.length-1]?.innerText?.substring(0,60)||'';const paginationBtns=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).filter(b=>{ const t=b.innerText?.trim()||'';const al=b.getAttribute('aria-label')||''; return(/^[2-9]$|^\\d{2,}$/.test(t)||/next|다음|chevron.?right|›|»|>/.test(t+al+b.className))&&b.offsetParent!==null;});R.paginationBtnCount=paginationBtns.length;const navPagination=document.querySelector('nav[aria-label*=\"pagination\"],nav[aria-label*=\"page\"]');if(navPagination){ const navBtns=Array.from(navPagination.querySelectorAll('button,a')).filter(b=>b.offsetParent!==null); R.navPaginationBtns=navBtns.length;}let nextBtn=paginationBtns.find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return/next|다음|›|»|chevron.?right/i.test(t+b.className);});if(!nextBtn)nextBtn=paginationBtns.find(b=>b.innerText?.trim()==='2');if(!nextBtn&&navPagination){nextBtn=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/next|다음|›|»/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);}R.hasNextBtn=!!nextBtn;if(!nextBtn){R.warn='페이지네이션 버튼 없음 (데이터 부족 또는 미구현)';R.ok=true;return JSON.stringify(R);}nextBtn.click();await w(2000);const rows2=Array.from(document.querySelectorAll('table tbody tr'));R.page2RowCount=rows2.length;R.page2FirstRow=rows2[0]?.innerText?.substring(0,60)||'';R.dataChanged=R.page1FirstRow!==R.page2FirstRow;R.hasRows=R.page2RowCount>0;if(!R.dataChanged&&R.hasRows)R.warn='⚠️ 페이지 변경 후 동일 데이터 표시 (페이지네이션 미동작 의심)';if(!R.hasRows)R.warn='⚠️ 2페이지에 데이터 없음';const prevBtn=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return(/prev|이전|‹|«|chevron.?left/i.test(t+b.className)||b.innerText?.trim()==='1')&&b.offsetParent!==null;});if(!prevBtn&&navPagination){const pb=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/prev|이전|‹|«/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);if(pb)pb.click();}else if(prevBtn){prevBtn.click();}await w(1500);const rows3=Array.from(document.querySelectorAll('table tbody tr'));R.backToPage1=rows3[0]?.innerText?.substring(0,60)===R.page1FirstRow;if(!R.backToPage1)R.warn=(R.warn||'')+' ⚠️ 1페이지 복귀 후 데이터 불일치';R.ok=true;return JSON.stringify(R);})()", + "timeout": 20000, + "phase": "PAGINATION" + }, + { + "id": 12, + "name": "[판매관리 > 견적관리] 메뉴 이동", + "action": "menu_navigate", + "level1": "판매관리", + "level2": "견적관리", + "timeout": 10000 + }, + { + "id": 13, + "name": "[판매관리 > 견적관리] 페이지 로드 대기", + "action": "wait", + "timeout": 3000 + }, + { + "id": 14, + "name": "[판매관리 > 견적관리] 테이블 로드 대기", + "action": "wait_for_table", + "timeout": 5000 + }, + { + "id": 15, + "name": "[판매관리 > 견적관리] 행 수/중복 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'ROW_COUNT'};const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const pageInfo=document.body.innerText.match(/(\\d+)\\s*[-~]\\s*(\\d+)\\s*(of|중|개|건|/|총)\\s*(\\d+)/i);if(pageInfo){R.pageInfoText=pageInfo[0];R.totalItems=parseInt(pageInfo[4]);}const totalBadge=Array.from(document.querySelectorAll('[class*=\"badge\"],[class*=\"count\"],[class*=\"total\"]')).find(e=>/\\d+/.test(e.innerText));if(totalBadge)R.totalBadgeText=totalBadge.innerText?.trim();const emptyRows=Array.from(rows).filter(r=>r.innerText?.trim().length===0);R.emptyRowCount=emptyRows.length;if(emptyRows.length>0)R.warn='⚠️ 빈 행 '+emptyRows.length+'개 발견 (렌더링 버그 의심)';const rowTexts=Array.from(rows).map(r=>r.innerText?.trim().substring(0,80));const duplicates=rowTexts.filter((t,i)=>rowTexts.indexOf(t)!==i);R.duplicateCount=duplicates.length;if(duplicates.length>0)R.warn=(R.warn||'')+' ⚠️ 중복 행 '+duplicates.length+'개 발견';R.ok=true;return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 16, + "name": "[판매관리 > 견적관리] 컬럼 정렬 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'SORT'};const headers=Array.from(document.querySelectorAll('table thead th,table thead td,[role=\"columnheader\"]'));R.headerCount=headers.length;R.headerTexts=headers.map(h=>h.innerText?.trim()).filter(t=>t).slice(0,10);const sortableHeaders=headers.filter(h=>{ const t=h.innerText?.trim()||''; return t.length>0&&!h.querySelector('input[type=\"checkbox\"]')&&h.offsetParent!==null;});R.sortableCount=sortableHeaders.length;if(sortableHeaders.length===0){R.warn='정렬 가능한 헤더 없음';R.ok=true;return JSON.stringify(R);}const getFirstColValues=()=>Array.from(document.querySelectorAll('table tbody tr')).slice(0,5).map(r=>{const cells=r.querySelectorAll('td');return(cells[1]||cells[0])?.innerText?.trim().substring(0,30)||'';});R.beforeSort=getFirstColValues();const targetHeader=sortableHeaders.find(h=>h.innerText?.trim().length>1)||sortableHeaders[0];R.sortColumn=targetHeader.innerText?.trim();targetHeader.click();await w(1500);R.afterSort1=getFirstColValues();R.sortChanged1=JSON.stringify(R.beforeSort)!==JSON.stringify(R.afterSort1);targetHeader.click();await w(1500);R.afterSort2=getFirstColValues();R.sortChanged2=JSON.stringify(R.afterSort1)!==JSON.stringify(R.afterSort2);if(!R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 컬럼 클릭 후 정렬 변화 없음 (정렬 미구현 의심)';else if(R.sortChanged1&&!R.sortChanged2)R.warn='⚠️ 역순 정렬 미동작 (한방향만 정렬)';R.ok=true;return JSON.stringify(R);})()", + "timeout": 15000, + "phase": "SORT" + }, + { + "id": 17, + "name": "[판매관리 > 견적관리] 페이지네이션 검증", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'PAGINATION'};const rows1=Array.from(document.querySelectorAll('table tbody tr'));R.page1RowCount=rows1.length;R.page1FirstRow=rows1[0]?.innerText?.substring(0,60)||'';R.page1LastRow=rows1[rows1.length-1]?.innerText?.substring(0,60)||'';const paginationBtns=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).filter(b=>{ const t=b.innerText?.trim()||'';const al=b.getAttribute('aria-label')||''; return(/^[2-9]$|^\\d{2,}$/.test(t)||/next|다음|chevron.?right|›|»|>/.test(t+al+b.className))&&b.offsetParent!==null;});R.paginationBtnCount=paginationBtns.length;const navPagination=document.querySelector('nav[aria-label*=\"pagination\"],nav[aria-label*=\"page\"]');if(navPagination){ const navBtns=Array.from(navPagination.querySelectorAll('button,a')).filter(b=>b.offsetParent!==null); R.navPaginationBtns=navBtns.length;}let nextBtn=paginationBtns.find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return/next|다음|›|»|chevron.?right/i.test(t+b.className);});if(!nextBtn)nextBtn=paginationBtns.find(b=>b.innerText?.trim()==='2');if(!nextBtn&&navPagination){nextBtn=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/next|다음|›|»/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);}R.hasNextBtn=!!nextBtn;if(!nextBtn){R.warn='페이지네이션 버튼 없음 (데이터 부족 또는 미구현)';R.ok=true;return JSON.stringify(R);}nextBtn.click();await w(2000);const rows2=Array.from(document.querySelectorAll('table tbody tr'));R.page2RowCount=rows2.length;R.page2FirstRow=rows2[0]?.innerText?.substring(0,60)||'';R.dataChanged=R.page1FirstRow!==R.page2FirstRow;R.hasRows=R.page2RowCount>0;if(!R.dataChanged&&R.hasRows)R.warn='⚠️ 페이지 변경 후 동일 데이터 표시 (페이지네이션 미동작 의심)';if(!R.hasRows)R.warn='⚠️ 2페이지에 데이터 없음';const prevBtn=Array.from(document.querySelectorAll('button,a,[role=\"button\"]')).find(b=>{const t=(b.innerText?.trim()||'')+(b.getAttribute('aria-label')||'');return(/prev|이전|‹|«|chevron.?left/i.test(t+b.className)||b.innerText?.trim()==='1')&&b.offsetParent!==null;});if(!prevBtn&&navPagination){const pb=Array.from(navPagination.querySelectorAll('button,a')).find(b=>/prev|이전|‹|«/i.test((b.innerText||'')+(b.getAttribute('aria-label')||'')+b.className)&&b.offsetParent!==null);if(pb)pb.click();}else if(prevBtn){prevBtn.click();}await w(1500);const rows3=Array.from(document.querySelectorAll('table tbody tr'));R.backToPage1=rows3[0]?.innerText?.substring(0,60)===R.page1FirstRow;if(!R.backToPage1)R.warn=(R.warn||'')+' ⚠️ 1페이지 복귀 후 데이터 불일치';R.ok=true;return JSON.stringify(R);})()", + "timeout": 20000, + "phase": "PAGINATION" + } + ] +} \ No newline at end of file diff --git a/reload-persist-acc-bills.json b/reload-persist-acc-bills.json new file mode 100644 index 0000000..829e379 --- /dev/null +++ b/reload-persist-acc-bills.json @@ -0,0 +1,129 @@ +{ + "id": "reload-persist-acc-bills", + "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": "[회계관리 > 어음관리] [CREATE] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE',ts};const testId='E2E'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/어음.*등록|등록/.test(b.innerText?.trim()));if(!btn){R.err='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);const numIn=document.querySelector('input[placeholder*=\"어음번호\"]')||Array.from(document.querySelectorAll('input[type=\"text\"]')).find(i=>i.offsetParent!==null&&!i.readOnly&&!i.disabled);if(numIn){sv(numIn,'E2E_TEST_'+testId);await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);for(let i=0;ib.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!sub){R.err='등록 버튼 없음';return JSON.stringify(R);}sub.click();await w(3000);R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 4, + "name": "[회계관리 > 어음관리] [CREATE] 생성 후 대기", + "action": "wait", + "timeout": 3000 + }, + { + "id": 5, + "name": "[회계관리 > 어음관리] [CREATE] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=view')||location.search.includes('mode=edit')||location.search.includes('mode=new')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소|뒤로/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 6, + "name": "[회계관리 > 어음관리] [CREATE] 목록 안정화", + "action": "wait", + "timeout": 2000 + }, + { + "id": 7, + "name": "[회계관리 > 어음관리] [VERIFY] 새로고침 전 데이터 확인", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY'};await w(500);const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const found=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));R.found=!!found;R.ok=R.found;if(found)R.foundText=found.innerText?.substring(0,80);if(!found)R.err='⚠️ 새로고침 후 E2E_TEST_ 데이터 사라짐 — 서버 저장 실패 의심';return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 8, + "name": "[회계관리 > 어음관리] [RELOAD] 페이지 새로고침", + "action": "reload", + "timeout": 10000 + }, + { + "id": 9, + "name": "[회계관리 > 어음관리] [RELOAD] 새로고침 후 대기", + "action": "wait", + "timeout": 5000 + }, + { + "id": 10, + "name": "[회계관리 > 어음관리] [RELOAD] SPA 안정화 대기", + "action": "wait", + "timeout": 5000 + }, + { + "id": 11, + "name": "[회계관리 > 어음관리] [VERIFY] 새로고침 후 데이터 유지 확인", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY'};await w(500);const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const found=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));R.found=!!found;R.ok=R.found;if(found)R.foundText=found.innerText?.substring(0,80);if(!found)R.err='⚠️ 새로고침 후 E2E_TEST_ 데이터 사라짐 — 서버 저장 실패 의심';return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 12, + "name": "[회계관리 > 어음관리] [DELETE] 테스트 데이터 삭제", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'DELETE'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const row=rows.find(r=>r.innerText?.includes('E2E_TEST_')||r.innerText?.includes('E2E'));if(!row){R.err='E2E_TEST_ 행 없음';R.ok=false;return JSON.stringify(R);}row.click();await w(2500);const delBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='삭제');if(!delBtn){R.err='삭제 버튼 없음';R.ok=false;return JSON.stringify(R);}delBtn.click();await w(1000);const cfm=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button,button')).find(b=>/확인|삭제|예|Yes/.test(b.innerText?.trim())&&b!==delBtn&&b.offsetParent!==null);if(cfm){cfm.click();await w(3000);}R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 13, + "name": "[회계관리 > 어음관리] [DELETE] 삭제 후 대기", + "action": "wait", + "timeout": 3000 + }, + { + "id": 14, + "name": "[회계관리 > 어음관리] [DELETE] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=view')||location.search.includes('mode=edit')||location.search.includes('mode=new')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소|뒤로/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 15, + "name": "[회계관리 > 어음관리] [DELETE] 목록 안정화", + "action": "wait", + "timeout": 2000 + }, + { + "id": 16, + "name": "[회계관리 > 어음관리] [VERIFY] 삭제 확인", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY_DELETE'};await w(500);const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const found=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));R.stillExists=!!found;R.ok=!found;if(found)R.warn='E2E_TEST_ 데이터가 여전히 존재';return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + } + ] +} \ No newline at end of file diff --git a/reload-persist-acc-deposit.json b/reload-persist-acc-deposit.json new file mode 100644 index 0000000..e205ecd --- /dev/null +++ b/reload-persist-acc-deposit.json @@ -0,0 +1,129 @@ +{ + "id": "reload-persist-acc-deposit", + "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": "[회계관리 > 입금관리] [CREATE] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE',ts};const btn=Array.from(document.querySelectorAll('button')).find(b=>/입금.*등록|입금등록|등록/.test(b.innerText?.trim()));if(!btn){R.err='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);const nameIn=document.querySelector('input[placeholder*=\"입금자명\"]')||document.querySelector('input[placeholder*=\"입금자\"]');if(nameIn){sv(nameIn,'E2E_TEST_리로드_'+ts);await w(200);}const amtIn=document.querySelector('input[placeholder*=\"입금금액\"]')||document.querySelector('input[type=\"number\"]');if(amtIn){sv(amtIn,'50000');await w(200);}const noteIn=document.querySelector('input[placeholder*=\"적요\"]');if(noteIn){sv(noteIn,'E2E_TEST_입금리로드');await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);for(const cb of combos){const lbl=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||'';if(lbl.includes('거래처')){cb.click();await w(600);const lb=document.querySelector('[role=\"listbox\"]');if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(400);}}else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);}break;}}for(const cb of combos){const lbl=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||'';if(lbl.includes('유형')){cb.click();await w(600);const lb=document.querySelector('[role=\"listbox\"]');if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(400);}}else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);}break;}}const sub=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!sub){R.err='등록 버튼 없음';return JSON.stringify(R);}sub.click();await w(3000);R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 4, + "name": "[회계관리 > 입금관리] [CREATE] 생성 후 대기", + "action": "wait", + "timeout": 3000 + }, + { + "id": 5, + "name": "[회계관리 > 입금관리] [CREATE] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=view')||location.search.includes('mode=edit')||location.search.includes('mode=new')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소|뒤로/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 6, + "name": "[회계관리 > 입금관리] [CREATE] 목록 안정화", + "action": "wait", + "timeout": 2000 + }, + { + "id": 7, + "name": "[회계관리 > 입금관리] [VERIFY] 새로고침 전 데이터 확인", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY'};await w(500);const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const found=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));R.found=!!found;R.ok=R.found;if(found)R.foundText=found.innerText?.substring(0,80);if(!found)R.err='⚠️ 새로고침 후 E2E_TEST_ 데이터 사라짐 — 서버 저장 실패 의심';return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 8, + "name": "[회계관리 > 입금관리] [RELOAD] 페이지 새로고침", + "action": "reload", + "timeout": 10000 + }, + { + "id": 9, + "name": "[회계관리 > 입금관리] [RELOAD] 새로고침 후 대기", + "action": "wait", + "timeout": 5000 + }, + { + "id": 10, + "name": "[회계관리 > 입금관리] [RELOAD] SPA 안정화 대기", + "action": "wait", + "timeout": 5000 + }, + { + "id": 11, + "name": "[회계관리 > 입금관리] [VERIFY] 새로고침 후 데이터 유지 확인", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY'};await w(500);const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const found=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));R.found=!!found;R.ok=R.found;if(found)R.foundText=found.innerText?.substring(0,80);if(!found)R.err='⚠️ 새로고침 후 E2E_TEST_ 데이터 사라짐 — 서버 저장 실패 의심';return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 12, + "name": "[회계관리 > 입금관리] [DELETE] 테스트 데이터 삭제", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'DELETE'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const row=rows.find(r=>r.innerText?.includes('E2E_TEST_'));if(!row){R.err='E2E_TEST_ 행 없음';R.ok=false;return JSON.stringify(R);}row.click();await w(2500);const delBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='삭제');if(!delBtn){R.err='삭제 버튼 없음';R.ok=false;return JSON.stringify(R);}delBtn.click();await w(1000);const cfm=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button,button')).find(b=>/확인|삭제|예|Yes/.test(b.innerText?.trim())&&b!==delBtn&&b.offsetParent!==null);if(cfm){cfm.click();await w(3000);}R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 13, + "name": "[회계관리 > 입금관리] [DELETE] 삭제 후 대기", + "action": "wait", + "timeout": 3000 + }, + { + "id": 14, + "name": "[회계관리 > 입금관리] [DELETE] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=view')||location.search.includes('mode=edit')||location.search.includes('mode=new')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소|뒤로/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 15, + "name": "[회계관리 > 입금관리] [DELETE] 목록 안정화", + "action": "wait", + "timeout": 2000 + }, + { + "id": 16, + "name": "[회계관리 > 입금관리] [VERIFY] 삭제 확인", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY_DELETE'};await w(500);const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const found=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));R.stillExists=!!found;R.ok=!found;if(found)R.warn='E2E_TEST_ 데이터가 여전히 존재';return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + } + ] +} \ No newline at end of file diff --git a/reload-persist-board.json b/reload-persist-board.json new file mode 100644 index 0000000..bd60e9d --- /dev/null +++ b/reload-persist-board.json @@ -0,0 +1,129 @@ +{ + "id": "reload-persist-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": "[게시판 > 자유게시판] [CREATE] 데이터 생성", + "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=(()=>{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());})();const R={phase:'CREATE',ts};const testTitle='E2E_TEST_리로드_'+ts;R.testTitle=testTitle;const btn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='글쓰기'||/등록|작성/.test(b.innerText?.trim()));if(!btn){R.err='글쓰기 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);const ti=document.querySelector('input[placeholder*=\"제목\"]')||document.querySelector('input[type=\"text\"]');if(!ti){R.err='제목 입력란 없음';return JSON.stringify(R);}sv(ti,testTitle);await w(200);const ta=document.querySelector('textarea');if(ta){sv(ta,'새로고침 후 유지되어야 하는 테스트 데이터');await w(200);}const sub=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록');if(!sub){R.err='등록 버튼 없음';return JSON.stringify(R);}sub.click();await w(3000);R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "CREATE" + }, + { + "id": 4, + "name": "[게시판 > 자유게시판] [CREATE] 생성 후 대기", + "action": "wait", + "timeout": 3000 + }, + { + "id": 5, + "name": "[게시판 > 자유게시판] [CREATE] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=view')||location.search.includes('mode=edit')||location.search.includes('mode=new')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소|뒤로/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "CREATE" + }, + { + "id": 6, + "name": "[게시판 > 자유게시판] [CREATE] 목록 안정화", + "action": "wait", + "timeout": 2000 + }, + { + "id": 7, + "name": "[게시판 > 자유게시판] [VERIFY] 새로고침 전 데이터 확인", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY'};await w(500);const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const found=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));R.found=!!found;R.ok=R.found;if(found)R.foundText=found.innerText?.substring(0,80);if(!found)R.err='⚠️ 새로고침 후 E2E_TEST_ 데이터 사라짐 — 서버 저장 실패 의심';return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 8, + "name": "[게시판 > 자유게시판] [RELOAD] 페이지 새로고침", + "action": "reload", + "timeout": 10000 + }, + { + "id": 9, + "name": "[게시판 > 자유게시판] [RELOAD] 새로고침 후 대기", + "action": "wait", + "timeout": 5000 + }, + { + "id": 10, + "name": "[게시판 > 자유게시판] [RELOAD] SPA 안정화 대기", + "action": "wait", + "timeout": 5000 + }, + { + "id": 11, + "name": "[게시판 > 자유게시판] [VERIFY] 새로고침 후 데이터 유지 확인", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY'};await w(500);const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const found=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));R.found=!!found;R.ok=R.found;if(found)R.foundText=found.innerText?.substring(0,80);if(!found)R.err='⚠️ 새로고침 후 E2E_TEST_ 데이터 사라짐 — 서버 저장 실패 의심';return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + }, + { + "id": 12, + "name": "[게시판 > 자유게시판] [DELETE] 테스트 데이터 삭제", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'DELETE'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const row=rows.find(r=>r.innerText?.includes('E2E_TEST_'));if(!row){R.err='E2E_TEST_ 행 없음';R.ok=false;return JSON.stringify(R);}row.click();await w(2500);const delBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='삭제');if(!delBtn){R.err='삭제 버튼 없음';R.ok=false;return JSON.stringify(R);}delBtn.click();await w(1000);const cfm=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button,button')).find(b=>/확인|삭제|예|Yes/.test(b.innerText?.trim())&&b!==delBtn&&b.offsetParent!==null);if(cfm){cfm.click();await w(3000);}R.ok=true;return JSON.stringify(R);})()", + "timeout": 30000, + "phase": "DELETE", + "critical": true + }, + { + "id": 13, + "name": "[게시판 > 자유게시판] [DELETE] 삭제 후 대기", + "action": "wait", + "timeout": 3000 + }, + { + "id": 14, + "name": "[게시판 > 자유게시판] [DELETE] 목록 복귀", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));if(location.search.includes('mode=view')||location.search.includes('mode=edit')||location.search.includes('mode=new')){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소|뒤로/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", + "timeout": 10000, + "phase": "DELETE" + }, + { + "id": 15, + "name": "[게시판 > 자유게시판] [DELETE] 목록 안정화", + "action": "wait", + "timeout": 2000 + }, + { + "id": 16, + "name": "[게시판 > 자유게시판] [VERIFY] 삭제 확인", + "action": "evaluate", + "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const R={phase:'VERIFY_DELETE'};await w(500);const rows=document.querySelectorAll('table tbody tr');R.rowCount=rows.length;const found=Array.from(rows).find(r=>r.innerText?.includes('E2E_TEST_'));R.stillExists=!!found;R.ok=!found;if(found)R.warn='E2E_TEST_ 데이터가 여전히 존재';return JSON.stringify(R);})()", + "timeout": 10000, + "phase": "VERIFY" + } + ] +} \ No newline at end of file