- pagination-sort: 회계/판매/인사 테이블 정렬 및 페이지네이션 검증 (3 시나리오) - reload-persist: 자유게시판/어음/입금 데이터 새로고침 후 유지 확인 (3 시나리오) - batch-create: 3건 연속 등록 → 전체 확인 → 전체 삭제 (3 시나리오)
217 lines
22 KiB
JSON
217 lines
22 KiB
JSON
{
|
|
"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;i<combos.length;i++){ const cb=combos[i]; const label=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||''; if(label.includes('거래처')||i===1){ 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 amtInput=document.querySelector('input[placeholder*=\"금액\"]');if(amtInput){sv(amtInput,'20000');await w(200);}const dateButtons=Array.from(document.querySelectorAll('button')).filter(b=>b.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;i<combos.length;i++){ const cb=combos[i]; const label=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||''; if(label.includes('거래처')||i===1){ 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 amtInput=document.querySelector('input[placeholder*=\"금액\"]');if(amtInput){sv(amtInput,'30000');await w(200);}const dateButtons=Array.from(document.querySelectorAll('button')).filter(b=>b.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;i<combos.length;i++){ const cb=combos[i]; const label=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||''; if(label.includes('거래처')||i===1){ 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 amtInput=document.querySelector('input[placeholder*=\"금액\"]');if(amtInput){sv(amtInput,'40000');await w(200);}const dateButtons=Array.from(document.querySelectorAll('button')).filter(b=>b.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"
|
|
}
|
|
]
|
|
} |