fix: 어음관리 E2E 테스트 접두사 통일 (E2E_TEST_어음_ → E2E_TEST_EB)

QA팀 리포트: 프론트엔드가 어음번호를 E2E_TEST_EB 접두사로 생성하는데
테스트 스크립트는 E2E_TEST_어음_ 접두사로 검색하여 패턴 불일치 발생

수정 내용:
- accounting-bill.json: testData/fill_form/verify_detail 접두사 통일
- full-crud-acc-bills.json: testId 생성 패턴 E2E→EB, 비고 접두사 통일
- create-delete-acc-bills.json: testId 생성 패턴 E2E→EB, 비고 접두사 통일
- test-bills-14steps.json: 비고 접두사 통일
- batch-create-acc-bills.json: 비고 접두사 + 검증/삭제 검색 패턴 통일
- reload-persist-acc-bills.json: testId 생성 패턴 E2E→EB, 비고 접두사 통일
This commit is contained in:
김보곤
2026-02-23 14:52:44 +09:00
parent 21b272702d
commit 40980bf1b1
6 changed files with 18 additions and 18 deletions

View File

@@ -27,7 +27,7 @@
},
"testData": {
"create": {
"billNumber": "E2E_TEST_어음",
"billNumber": "E2E_TEST_EB",
"amount": "1000000",
"dueDate": "2026-03-15",
"issuer": "테스트발행처",
@@ -125,7 +125,7 @@
"fields": [
{
"name": "어음번호",
"value": "E2E_TEST_어음_{timestamp}"
"value": "E2E_TEST_EB_{timestamp}"
},
{
"name": "금액",
@@ -173,7 +173,7 @@
"phase": "CREATE",
"name": "[CREATE] 등록 결과 확인",
"action": "verify_detail",
"search": "E2E_TEST_어음",
"search": "E2E_TEST_EB",
"expected": {
"row_exists": true,
"contains": [
@@ -203,7 +203,7 @@
"name": "[READ] 상세 정보 확인",
"action": "verify_detail",
"checks": [
"어음번호: E2E_TEST_어음",
"어음번호: E2E_TEST_EB",
"금액: 1,000,000",
"만기일: 2026-03-15",
"발행처: 테스트발행처"

View File

@@ -37,7 +37,7 @@
"id": 4,
"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=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_1',ts,n:1};const testId='EB1'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/어음.*등록|등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const formArea=document.querySelector('main')||document.querySelector('[class*=\"content\"]')||document.body;const combos=Array.from(formArea.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar],[class*=Sidebar]'));R.comboCount=combos.length;for(let i=0;i<combos.length;i++){ document.body.click();await w(200); combos[i].scrollIntoView({block:'center'}); combos[i].click();await w(700); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);}}await w(300);const dateButtons=Array.from(formArea.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);for(const db of dateButtons){ db.scrollIntoView({block:'center'});await w(200); db.click();await w(600); if(!document.querySelector('table[class*=\"rdp\"],.rdp-month,[role=\"grid\"]')){db.click();await w(800);} const today=document.querySelector('[aria-selected=\"true\"]')||document.querySelector('button[name=\"day\"].bg-primary')||document.querySelector('.rdp-day_today button')||Array.from(document.querySelectorAll('button[name=\"day\"],td[role=\"gridcell\"] button,.rdp-day button')).find(b=>b.getAttribute('aria-selected')==='true'||b.classList.contains('bg-primary')||b.tabIndex===0)||document.querySelector('button[name=\"day\"]')||document.querySelector('td[role=\"gridcell\"] button'); if(today){today.click();await w(400);} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(300);}}await w(300);const numInput=document.querySelector('input[placeholder*=\"어음번호\"]')||Array.from(formArea.querySelectorAll('input[type=\"text\"]')).find(i=>i.offsetParent!==null&&!i.readOnly&&!i.disabled);if(numInput){sv(numInput,'E2E_TEST_'+testId);await w(200);}R.numFound=!!numInput;const amtInput=document.querySelector('input[placeholder*=\"금액\"]');if(amtInput){sv(amtInput,'20000');await w(200);}const noteInput=document.querySelector('input[placeholder*=\"비고\"]')||document.querySelector('textarea[placeholder*=\"비고\"]');if(noteInput){sv(noteInput,'E2E_TEST_어음_'+ts);await w(200);}R.noteFound=!!noteInput;if(noteInput&&!noteInput.value?.includes('E2E_TEST_')){sv(noteInput,'E2E_TEST_어음_'+ts);await w(200);R.refilled=true;}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>/^등록$|^저장$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!submitBtn){R.error='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;const valErrs=Array.from((formArea||document.body).querySelectorAll('[class*=\"error\"],[class*=\"invalid\"],.text-red-500,.text-destructive')).filter(e=>e.offsetParent!==null&&e.innerText?.trim()&&!e.closest('nav,[class*=sidebar],[class*=Sidebar]')).map(e=>e.innerText.trim()).slice(0,3);if(valErrs.length)R.valErrs=valErrs;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter+' errs='+JSON.stringify(valErrs);return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_1',ts,n:1};const testId='EB1'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/어음.*등록|등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const formArea=document.querySelector('main')||document.querySelector('[class*=\"content\"]')||document.body;const combos=Array.from(formArea.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar],[class*=Sidebar]'));R.comboCount=combos.length;for(let i=0;i<combos.length;i++){ document.body.click();await w(200); combos[i].scrollIntoView({block:'center'}); combos[i].click();await w(700); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);}}await w(300);const dateButtons=Array.from(formArea.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);for(const db of dateButtons){ db.scrollIntoView({block:'center'});await w(200); db.click();await w(600); if(!document.querySelector('table[class*=\"rdp\"],.rdp-month,[role=\"grid\"]')){db.click();await w(800);} const today=document.querySelector('[aria-selected=\"true\"]')||document.querySelector('button[name=\"day\"].bg-primary')||document.querySelector('.rdp-day_today button')||Array.from(document.querySelectorAll('button[name=\"day\"],td[role=\"gridcell\"] button,.rdp-day button')).find(b=>b.getAttribute('aria-selected')==='true'||b.classList.contains('bg-primary')||b.tabIndex===0)||document.querySelector('button[name=\"day\"]')||document.querySelector('td[role=\"gridcell\"] button'); if(today){today.click();await w(400);} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(300);}}await w(300);const numInput=document.querySelector('input[placeholder*=\"어음번호\"]')||Array.from(formArea.querySelectorAll('input[type=\"text\"]')).find(i=>i.offsetParent!==null&&!i.readOnly&&!i.disabled);if(numInput){sv(numInput,'E2E_TEST_'+testId);await w(200);}R.numFound=!!numInput;const amtInput=document.querySelector('input[placeholder*=\"금액\"]');if(amtInput){sv(amtInput,'20000');await w(200);}const noteInput=document.querySelector('input[placeholder*=\"비고\"]')||document.querySelector('textarea[placeholder*=\"비고\"]');if(noteInput){sv(noteInput,'E2E_TEST_EB_'+ts);await w(200);}R.noteFound=!!noteInput;if(noteInput&&!noteInput.value?.includes('E2E_TEST_')){sv(noteInput,'E2E_TEST_EB_'+ts);await w(200);R.refilled=true;}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>/^등록$|^저장$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!submitBtn){R.error='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;const valErrs=Array.from((formArea||document.body).querySelectorAll('[class*=\"error\"],[class*=\"invalid\"],.text-red-500,.text-destructive')).filter(e=>e.offsetParent!==null&&e.innerText?.trim()&&!e.closest('nav,[class*=sidebar],[class*=Sidebar]')).map(e=>e.innerText.trim()).slice(0,3);if(valErrs.length)R.valErrs=valErrs;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter+' errs='+JSON.stringify(valErrs);return JSON.stringify(R);})()",
"timeout": 30000,
"phase": "CREATE"
},
@@ -65,7 +65,7 @@
"id": 8,
"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=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_2',ts,n:2};const testId='EB2'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/어음.*등록|등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const formArea=document.querySelector('main')||document.querySelector('[class*=\"content\"]')||document.body;const combos=Array.from(formArea.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar],[class*=Sidebar]'));R.comboCount=combos.length;for(let i=0;i<combos.length;i++){ document.body.click();await w(200); combos[i].scrollIntoView({block:'center'}); combos[i].click();await w(700); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);}}await w(300);const dateButtons=Array.from(formArea.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);for(const db of dateButtons){ db.scrollIntoView({block:'center'});await w(200); db.click();await w(600); if(!document.querySelector('table[class*=\"rdp\"],.rdp-month,[role=\"grid\"]')){db.click();await w(800);} const today=document.querySelector('[aria-selected=\"true\"]')||document.querySelector('button[name=\"day\"].bg-primary')||document.querySelector('.rdp-day_today button')||Array.from(document.querySelectorAll('button[name=\"day\"],td[role=\"gridcell\"] button,.rdp-day button')).find(b=>b.getAttribute('aria-selected')==='true'||b.classList.contains('bg-primary')||b.tabIndex===0)||document.querySelector('button[name=\"day\"]')||document.querySelector('td[role=\"gridcell\"] button'); if(today){today.click();await w(400);} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(300);}}await w(300);const numInput=document.querySelector('input[placeholder*=\"어음번호\"]')||Array.from(formArea.querySelectorAll('input[type=\"text\"]')).find(i=>i.offsetParent!==null&&!i.readOnly&&!i.disabled);if(numInput){sv(numInput,'E2E_TEST_'+testId);await w(200);}R.numFound=!!numInput;const amtInput=document.querySelector('input[placeholder*=\"금액\"]');if(amtInput){sv(amtInput,'30000');await w(200);}const noteInput=document.querySelector('input[placeholder*=\"비고\"]')||document.querySelector('textarea[placeholder*=\"비고\"]');if(noteInput){sv(noteInput,'E2E_TEST_어음_'+ts);await w(200);}R.noteFound=!!noteInput;if(noteInput&&!noteInput.value?.includes('E2E_TEST_')){sv(noteInput,'E2E_TEST_어음_'+ts);await w(200);R.refilled=true;}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>/^등록$|^저장$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!submitBtn){R.error='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;const valErrs=Array.from((formArea||document.body).querySelectorAll('[class*=\"error\"],[class*=\"invalid\"],.text-red-500,.text-destructive')).filter(e=>e.offsetParent!==null&&e.innerText?.trim()&&!e.closest('nav,[class*=sidebar],[class*=Sidebar]')).map(e=>e.innerText.trim()).slice(0,3);if(valErrs.length)R.valErrs=valErrs;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter+' errs='+JSON.stringify(valErrs);return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_2',ts,n:2};const testId='EB2'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/어음.*등록|등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const formArea=document.querySelector('main')||document.querySelector('[class*=\"content\"]')||document.body;const combos=Array.from(formArea.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar],[class*=Sidebar]'));R.comboCount=combos.length;for(let i=0;i<combos.length;i++){ document.body.click();await w(200); combos[i].scrollIntoView({block:'center'}); combos[i].click();await w(700); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);}}await w(300);const dateButtons=Array.from(formArea.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);for(const db of dateButtons){ db.scrollIntoView({block:'center'});await w(200); db.click();await w(600); if(!document.querySelector('table[class*=\"rdp\"],.rdp-month,[role=\"grid\"]')){db.click();await w(800);} const today=document.querySelector('[aria-selected=\"true\"]')||document.querySelector('button[name=\"day\"].bg-primary')||document.querySelector('.rdp-day_today button')||Array.from(document.querySelectorAll('button[name=\"day\"],td[role=\"gridcell\"] button,.rdp-day button')).find(b=>b.getAttribute('aria-selected')==='true'||b.classList.contains('bg-primary')||b.tabIndex===0)||document.querySelector('button[name=\"day\"]')||document.querySelector('td[role=\"gridcell\"] button'); if(today){today.click();await w(400);} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(300);}}await w(300);const numInput=document.querySelector('input[placeholder*=\"어음번호\"]')||Array.from(formArea.querySelectorAll('input[type=\"text\"]')).find(i=>i.offsetParent!==null&&!i.readOnly&&!i.disabled);if(numInput){sv(numInput,'E2E_TEST_'+testId);await w(200);}R.numFound=!!numInput;const amtInput=document.querySelector('input[placeholder*=\"금액\"]');if(amtInput){sv(amtInput,'30000');await w(200);}const noteInput=document.querySelector('input[placeholder*=\"비고\"]')||document.querySelector('textarea[placeholder*=\"비고\"]');if(noteInput){sv(noteInput,'E2E_TEST_EB_'+ts);await w(200);}R.noteFound=!!noteInput;if(noteInput&&!noteInput.value?.includes('E2E_TEST_')){sv(noteInput,'E2E_TEST_EB_'+ts);await w(200);R.refilled=true;}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>/^등록$|^저장$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!submitBtn){R.error='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;const valErrs=Array.from((formArea||document.body).querySelectorAll('[class*=\"error\"],[class*=\"invalid\"],.text-red-500,.text-destructive')).filter(e=>e.offsetParent!==null&&e.innerText?.trim()&&!e.closest('nav,[class*=sidebar],[class*=Sidebar]')).map(e=>e.innerText.trim()).slice(0,3);if(valErrs.length)R.valErrs=valErrs;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter+' errs='+JSON.stringify(valErrs);return JSON.stringify(R);})()",
"timeout": 30000,
"phase": "CREATE"
},
@@ -93,7 +93,7 @@
"id": 12,
"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=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_3',ts,n:3};const testId='EB3'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/어음.*등록|등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const formArea=document.querySelector('main')||document.querySelector('[class*=\"content\"]')||document.body;const combos=Array.from(formArea.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar],[class*=Sidebar]'));R.comboCount=combos.length;for(let i=0;i<combos.length;i++){ document.body.click();await w(200); combos[i].scrollIntoView({block:'center'}); combos[i].click();await w(700); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);}}await w(300);const dateButtons=Array.from(formArea.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);for(const db of dateButtons){ db.scrollIntoView({block:'center'});await w(200); db.click();await w(600); if(!document.querySelector('table[class*=\"rdp\"],.rdp-month,[role=\"grid\"]')){db.click();await w(800);} const today=document.querySelector('[aria-selected=\"true\"]')||document.querySelector('button[name=\"day\"].bg-primary')||document.querySelector('.rdp-day_today button')||Array.from(document.querySelectorAll('button[name=\"day\"],td[role=\"gridcell\"] button,.rdp-day button')).find(b=>b.getAttribute('aria-selected')==='true'||b.classList.contains('bg-primary')||b.tabIndex===0)||document.querySelector('button[name=\"day\"]')||document.querySelector('td[role=\"gridcell\"] button'); if(today){today.click();await w(400);} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(300);}}await w(300);const numInput=document.querySelector('input[placeholder*=\"어음번호\"]')||Array.from(formArea.querySelectorAll('input[type=\"text\"]')).find(i=>i.offsetParent!==null&&!i.readOnly&&!i.disabled);if(numInput){sv(numInput,'E2E_TEST_'+testId);await w(200);}R.numFound=!!numInput;const amtInput=document.querySelector('input[placeholder*=\"금액\"]');if(amtInput){sv(amtInput,'40000');await w(200);}const noteInput=document.querySelector('input[placeholder*=\"비고\"]')||document.querySelector('textarea[placeholder*=\"비고\"]');if(noteInput){sv(noteInput,'E2E_TEST_어음_'+ts);await w(200);}R.noteFound=!!noteInput;if(noteInput&&!noteInput.value?.includes('E2E_TEST_')){sv(noteInput,'E2E_TEST_어음_'+ts);await w(200);R.refilled=true;}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>/^등록$|^저장$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!submitBtn){R.error='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;const valErrs=Array.from((formArea||document.body).querySelectorAll('[class*=\"error\"],[class*=\"invalid\"],.text-red-500,.text-destructive')).filter(e=>e.offsetParent!==null&&e.innerText?.trim()&&!e.closest('nav,[class*=sidebar],[class*=Sidebar]')).map(e=>e.innerText.trim()).slice(0,3);if(valErrs.length)R.valErrs=valErrs;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter+' errs='+JSON.stringify(valErrs);return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_3',ts,n:3};const testId='EB3'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/어음.*등록|등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const formArea=document.querySelector('main')||document.querySelector('[class*=\"content\"]')||document.body;const combos=Array.from(formArea.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar],[class*=Sidebar]'));R.comboCount=combos.length;for(let i=0;i<combos.length;i++){ document.body.click();await w(200); combos[i].scrollIntoView({block:'center'}); combos[i].click();await w(700); const lb=document.querySelector('[role=\"listbox\"]'); if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);}}await w(300);const dateButtons=Array.from(formArea.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);for(const db of dateButtons){ db.scrollIntoView({block:'center'});await w(200); db.click();await w(600); if(!document.querySelector('table[class*=\"rdp\"],.rdp-month,[role=\"grid\"]')){db.click();await w(800);} const today=document.querySelector('[aria-selected=\"true\"]')||document.querySelector('button[name=\"day\"].bg-primary')||document.querySelector('.rdp-day_today button')||Array.from(document.querySelectorAll('button[name=\"day\"],td[role=\"gridcell\"] button,.rdp-day button')).find(b=>b.getAttribute('aria-selected')==='true'||b.classList.contains('bg-primary')||b.tabIndex===0)||document.querySelector('button[name=\"day\"]')||document.querySelector('td[role=\"gridcell\"] button'); if(today){today.click();await w(400);} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(300);}}await w(300);const numInput=document.querySelector('input[placeholder*=\"어음번호\"]')||Array.from(formArea.querySelectorAll('input[type=\"text\"]')).find(i=>i.offsetParent!==null&&!i.readOnly&&!i.disabled);if(numInput){sv(numInput,'E2E_TEST_'+testId);await w(200);}R.numFound=!!numInput;const amtInput=document.querySelector('input[placeholder*=\"금액\"]');if(amtInput){sv(amtInput,'40000');await w(200);}const noteInput=document.querySelector('input[placeholder*=\"비고\"]')||document.querySelector('textarea[placeholder*=\"비고\"]');if(noteInput){sv(noteInput,'E2E_TEST_EB_'+ts);await w(200);}R.noteFound=!!noteInput;if(noteInput&&!noteInput.value?.includes('E2E_TEST_')){sv(noteInput,'E2E_TEST_EB_'+ts);await w(200);R.refilled=true;}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>/^등록$|^저장$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!submitBtn){R.error='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;const valErrs=Array.from((formArea||document.body).querySelectorAll('[class*=\"error\"],[class*=\"invalid\"],.text-red-500,.text-destructive')).filter(e=>e.offsetParent!==null&&e.innerText?.trim()&&!e.closest('nav,[class*=sidebar],[class*=Sidebar]')).map(e=>e.innerText.trim()).slice(0,3);if(valErrs.length)R.valErrs=valErrs;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter+' errs='+JSON.stringify(valErrs);return JSON.stringify(R);})()",
"timeout": 30000,
"phase": "CREATE"
},
@@ -132,7 +132,7 @@
"id": 18,
"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=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'VERIFY_BATCH',expected:3,ts};await w(1000);R.url=location.pathname;const rows=Array.from(document.querySelectorAll('table tbody tr'));R.rowCount=rows.length;let batchRows=rows.filter(r=>r.innerText?.includes('E2E_TEST_어음_')&&r.innerText?.includes(ts));if(!batchRows.length&&3>0){batchRows=rows.filter(r=>r.innerText?.includes('E2E_TEST_어음_'));R.usedFallback=true;}R.batchCount=batchRows.length;R.countMatch=3===0?R.batchCount===0:R.batchCount>=3;if(!R.countMatch){R.row0=rows[0]?.innerText?.substring(0,80);R.bodyHas=document.body.innerText.includes('E2E_TEST_어음_');R.warn='기대 3건, 실제 '+R.batchCount+'건 rows='+R.rowCount+' body='+R.bodyHas+' row0=['+R.row0+']';}R.ok=R.countMatch;return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'VERIFY_BATCH',expected:3,ts};await w(1000);R.url=location.pathname;const rows=Array.from(document.querySelectorAll('table tbody tr'));R.rowCount=rows.length;let batchRows=rows.filter(r=>r.innerText?.includes('E2E_TEST_EB')&&r.innerText?.includes(ts));if(!batchRows.length&&3>0){batchRows=rows.filter(r=>r.innerText?.includes('E2E_TEST_EB'));R.usedFallback=true;}R.batchCount=batchRows.length;R.countMatch=3===0?R.batchCount===0:R.batchCount>=3;if(!R.countMatch){R.row0=rows[0]?.innerText?.substring(0,80);R.bodyHas=document.body.innerText.includes('E2E_TEST_EB');R.warn='기대 3건, 실제 '+R.batchCount+'건 rows='+R.rowCount+' body='+R.bodyHas+' row0=['+R.row0+']';}R.ok=R.countMatch;return JSON.stringify(R);})()",
"timeout": 15000,
"phase": "VERIFY"
},
@@ -140,7 +140,7 @@
"id": 19,
"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=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'DELETE_1'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_TEST_어음_')&&r.innerText?.includes(ts))||rows.find(r=>r.innerText?.includes('E2E_TEST_어음_'));if(!targetRow){R.error='E2E_TEST_어음_ 데이터 없음 (ts='+ts+')';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.error='삭제 버튼 없음';R.ok=false;return JSON.stringify(R);}delBtn.click();await w(1000);const confirmBtn=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button,button')).find(b=>/확인|삭제|예|Yes/.test(b.innerText?.trim())&&b!==delBtn&&b.offsetParent!==null);if(confirmBtn){confirmBtn.click();await w(3000);}R.urlAfter=location.pathname+location.search;R.deleted=!document.body.innerText?.includes(R.targetText?.substring(0,20));R.ok=R.deleted!==false;return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'DELETE_1'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_TEST_EB')&&r.innerText?.includes(ts))||rows.find(r=>r.innerText?.includes('E2E_TEST_EB'));if(!targetRow){R.error='E2E_TEST_EB 데이터 없음 (ts='+ts+')';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.error='삭제 버튼 없음';R.ok=false;return JSON.stringify(R);}delBtn.click();await w(1000);const confirmBtn=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button,button')).find(b=>/확인|삭제|예|Yes/.test(b.innerText?.trim())&&b!==delBtn&&b.offsetParent!==null);if(confirmBtn){confirmBtn.click();await w(3000);}R.urlAfter=location.pathname+location.search;R.deleted=!document.body.innerText?.includes(R.targetText?.substring(0,20));R.ok=R.deleted!==false;return JSON.stringify(R);})()",
"timeout": 30000,
"phase": "DELETE",
"critical": true
@@ -169,7 +169,7 @@
"id": 23,
"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=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'DELETE_2'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_TEST_어음_')&&r.innerText?.includes(ts))||rows.find(r=>r.innerText?.includes('E2E_TEST_어음_'));if(!targetRow){R.error='E2E_TEST_어음_ 데이터 없음 (ts='+ts+')';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.error='삭제 버튼 없음';R.ok=false;return JSON.stringify(R);}delBtn.click();await w(1000);const confirmBtn=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button,button')).find(b=>/확인|삭제|예|Yes/.test(b.innerText?.trim())&&b!==delBtn&&b.offsetParent!==null);if(confirmBtn){confirmBtn.click();await w(3000);}R.urlAfter=location.pathname+location.search;R.deleted=!document.body.innerText?.includes(R.targetText?.substring(0,20));R.ok=R.deleted!==false;return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'DELETE_2'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_TEST_EB')&&r.innerText?.includes(ts))||rows.find(r=>r.innerText?.includes('E2E_TEST_EB'));if(!targetRow){R.error='E2E_TEST_EB 데이터 없음 (ts='+ts+')';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.error='삭제 버튼 없음';R.ok=false;return JSON.stringify(R);}delBtn.click();await w(1000);const confirmBtn=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button,button')).find(b=>/확인|삭제|예|Yes/.test(b.innerText?.trim())&&b!==delBtn&&b.offsetParent!==null);if(confirmBtn){confirmBtn.click();await w(3000);}R.urlAfter=location.pathname+location.search;R.deleted=!document.body.innerText?.includes(R.targetText?.substring(0,20));R.ok=R.deleted!==false;return JSON.stringify(R);})()",
"timeout": 30000,
"phase": "DELETE",
"critical": true
@@ -198,7 +198,7 @@
"id": 27,
"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=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'DELETE_3'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_TEST_어음_')&&r.innerText?.includes(ts))||rows.find(r=>r.innerText?.includes('E2E_TEST_어음_'));if(!targetRow){R.error='E2E_TEST_어음_ 데이터 없음 (ts='+ts+')';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.error='삭제 버튼 없음';R.ok=false;return JSON.stringify(R);}delBtn.click();await w(1000);const confirmBtn=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button,button')).find(b=>/확인|삭제|예|Yes/.test(b.innerText?.trim())&&b!==delBtn&&b.offsetParent!==null);if(confirmBtn){confirmBtn.click();await w(3000);}R.urlAfter=location.pathname+location.search;R.deleted=!document.body.innerText?.includes(R.targetText?.substring(0,20));R.ok=R.deleted!==false;return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'DELETE_3'};const rows=Array.from(document.querySelectorAll('table tbody tr'));const targetRow=rows.find(r=>r.innerText?.includes('E2E_TEST_EB')&&r.innerText?.includes(ts))||rows.find(r=>r.innerText?.includes('E2E_TEST_EB'));if(!targetRow){R.error='E2E_TEST_EB 데이터 없음 (ts='+ts+')';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.error='삭제 버튼 없음';R.ok=false;return JSON.stringify(R);}delBtn.click();await w(1000);const confirmBtn=Array.from(document.querySelectorAll('[role=\"alertdialog\"] button,[role=\"dialog\"] button,button')).find(b=>/확인|삭제|예|Yes/.test(b.innerText?.trim())&&b!==delBtn&&b.offsetParent!==null);if(confirmBtn){confirmBtn.click();await w(3000);}R.urlAfter=location.pathname+location.search;R.deleted=!document.body.innerText?.includes(R.targetText?.substring(0,20));R.ok=R.deleted!==false;return JSON.stringify(R);})()",
"timeout": 30000,
"phase": "DELETE",
"critical": true
@@ -238,7 +238,7 @@
"id": 33,
"name": "[회계관리 > 어음관리] [VERIFY] 전체 삭제 확인",
"action": "evaluate",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'VERIFY_BATCH',expected:0,ts};await w(1000);R.url=location.pathname;const rows=Array.from(document.querySelectorAll('table tbody tr'));R.rowCount=rows.length;let batchRows=rows.filter(r=>r.innerText?.includes('E2E_TEST_어음_')&&r.innerText?.includes(ts));if(!batchRows.length&&0>0){batchRows=rows.filter(r=>r.innerText?.includes('E2E_TEST_어음_'));R.usedFallback=true;}R.batchCount=batchRows.length;R.countMatch=0===0?R.batchCount===0:R.batchCount>=0;if(!R.countMatch){R.row0=rows[0]?.innerText?.substring(0,80);R.bodyHas=document.body.innerText.includes('E2E_TEST_어음_');R.warn='기대 0건, 실제 '+R.batchCount+'건 rows='+R.rowCount+' body='+R.bodyHas+' row0=['+R.row0+']';}R.ok=R.countMatch;return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'VERIFY_BATCH',expected:0,ts};await w(1000);R.url=location.pathname;const rows=Array.from(document.querySelectorAll('table tbody tr'));R.rowCount=rows.length;let batchRows=rows.filter(r=>r.innerText?.includes('E2E_TEST_EB')&&r.innerText?.includes(ts));if(!batchRows.length&&0>0){batchRows=rows.filter(r=>r.innerText?.includes('E2E_TEST_EB'));R.usedFallback=true;}R.batchCount=batchRows.length;R.countMatch=0===0?R.batchCount===0:R.batchCount>=0;if(!R.countMatch){R.row0=rows[0]?.innerText?.substring(0,80);R.bodyHas=document.body.innerText.includes('E2E_TEST_EB');R.warn='기대 0건, 실제 '+R.batchCount+'건 rows='+R.rowCount+' body='+R.bodyHas+' row0=['+R.row0+']';}R.ok=R.countMatch;return JSON.stringify(R);})()",
"timeout": 15000,
"phase": "VERIFY"
}

View File

@@ -30,7 +30,7 @@
"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=window.__E2E_TS__||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;const R={phase:'CREATE',ts};const testId='E2E'+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.error='등록 버튼 없음';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_TEST_'+testId);await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);R.comboCount=combos.length;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);R.selectedClient=opt.innerText?.trim().substring(0,30);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);} break; }}const amtInput=document.querySelector('input[placeholder*=\"금액\"]');if(amtInput){sv(amtInput,'10000');await w(200);}const dateButtons=Array.from(document.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);R.dateCount=dateButtons.length;for(const db of dateButtons){ db.click();await w(500); const today=document.querySelector('[aria-selected=\"true\"]')||document.querySelector('button[name=\"day\"].bg-primary')||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_TEST_어음_'+ts);await w(200);}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!submitBtn){R.error='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.navigatedBack=!location.search.includes('mode=new');R.ok=true;return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;const R={phase:'CREATE',ts};const testId='EB'+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.error='등록 버튼 없음';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_TEST_'+testId);await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);R.comboCount=combos.length;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);R.selectedClient=opt.innerText?.trim().substring(0,30);}} else{document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);} break; }}const amtInput=document.querySelector('input[placeholder*=\"금액\"]');if(amtInput){sv(amtInput,'10000');await w(200);}const dateButtons=Array.from(document.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);R.dateCount=dateButtons.length;for(const db of dateButtons){ db.click();await w(500); const today=document.querySelector('[aria-selected=\"true\"]')||document.querySelector('button[name=\"day\"].bg-primary')||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_TEST_EB_'+ts);await w(200);}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!submitBtn){R.error='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.navigatedBack=!location.search.includes('mode=new');R.ok=true;return JSON.stringify(R);})()",
"timeout": 30000,
"phase": "CREATE"
},

View File

@@ -30,7 +30,7 @@
"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=window.__E2E_TS__||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;const toastInfo=()=>{const ts=document.querySelectorAll('[data-sonner-toast],[role=\"status\"],[class*=\"toast\"],[class*=\"Toast\"],[class*=\"Toaster\"] [data-content]');return{count:ts.length,text:ts.length>0?Array.from(ts).pop()?.innerText?.trim().substring(0,100):''};};const R={phase:'CREATE',ts};const testId='E2E'+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.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);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_TEST_'+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 lbl=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||'';if(lbl.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 amt=document.querySelector('input[placeholder*=\"금액\"]');if(amt){sv(amt,'10000');await w(200);}const note=document.querySelector('input[placeholder*=\"비고\"]');if(note){sv(note,'E2E_TEST_어음_'+ts);await w(200);}const sub=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!sub){R.error='등록 버튼 없음';return JSON.stringify(R);}sub.click();await w(3000);R.toast=toastInfo();R.ok=true;return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;const toastInfo=()=>{const ts=document.querySelectorAll('[data-sonner-toast],[role=\"status\"],[class*=\"toast\"],[class*=\"Toast\"],[class*=\"Toaster\"] [data-content]');return{count:ts.length,text:ts.length>0?Array.from(ts).pop()?.innerText?.trim().substring(0,100):''};};const R={phase:'CREATE',ts};const testId='EB'+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.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);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_TEST_'+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 lbl=cb.closest('[class*=field],[class*=Field],[class*=form-item]')?.querySelector('label')?.innerText||'';if(lbl.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 amt=document.querySelector('input[placeholder*=\"금액\"]');if(amt){sv(amt,'10000');await w(200);}const note=document.querySelector('input[placeholder*=\"비고\"]');if(note){sv(note,'E2E_TEST_EB_'+ts);await w(200);}const sub=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!sub){R.error='등록 버튼 없음';return JSON.stringify(R);}sub.click();await w(3000);R.toast=toastInfo();R.ok=true;return JSON.stringify(R);})()",
"timeout": 30000,
"phase": "CREATE"
},

View File

@@ -30,7 +30,7 @@
"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=window.__E2E_TS__||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{localStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE',ts};const testId='E2E'+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.error='등록 버튼 없음';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_TEST_'+testId);await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);R.comboCount=combos.length;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,'10000');await w(200);}const dateButtons=Array.from(document.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);R.dateCount=dateButtons.length;for(const db of dateButtons){ db.click();await w(500); const today=document.querySelector('[aria-selected=\"true\"]')||document.querySelector('button[name=\"day\"].bg-primary')||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_TEST_리로드_'+ts);await w(200);}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!submitBtn){R.error='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.navigatedBack=!location.search.includes('mode=new');R.ok=R.navigatedBack;if(!R.ok)R.error='등록 후 여전히 폼 페이지 (url='+R.urlAfter+')';return JSON.stringify(R);})()",
"script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const sv=(el,v)=>{const p=el.tagName==='TEXTAREA'?HTMLTextAreaElement.prototype:HTMLInputElement.prototype;const ns=Object.getOwnPropertyDescriptor(p,'value')?.set;if(ns)ns.call(el,v);else el.value=v;el.dispatchEvent(new Event('input',{bubbles:true}));el.dispatchEvent(new Event('change',{bubbles:true}));};const ts=window.__E2E_TS__||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{localStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE',ts};const testId='EB'+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.error='등록 버튼 없음';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_TEST_'+testId);await w(200);}const combos=Array.from(document.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null);R.comboCount=combos.length;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,'10000');await w(200);}const dateButtons=Array.from(document.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);R.dateCount=dateButtons.length;for(const db of dateButtons){ db.click();await w(500); const today=document.querySelector('[aria-selected=\"true\"]')||document.querySelector('button[name=\"day\"].bg-primary')||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_TEST_EB_'+ts);await w(200);}const submitBtn=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='등록'&&b.offsetParent!==null);if(!submitBtn){R.error='등록 버튼 없음';return JSON.stringify(R);}submitBtn.click();await w(3000);R.urlAfter=location.pathname+location.search;R.navigatedBack=!location.search.includes('mode=new');R.ok=R.navigatedBack;if(!R.ok)R.error='등록 후 여전히 폼 페이지 (url='+R.urlAfter+')';return JSON.stringify(R);})()",
"timeout": 30000,
"phase": "CREATE"
},

View File

@@ -29,7 +29,7 @@
"id": 4,
"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 selCombo=async(cb)=>{document.body.click();await w(300);cb.scrollIntoView({block:'center'});cb.click();await w(800);const lb=document.querySelector('[role=\"listbox\"]');if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);return opt.innerText?.trim().substring(0,30);}}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return null;};const pickDate=async(trigBtn)=>{trigBtn.scrollIntoView({block:'center'});trigBtn.click();await w(800);const todayTd=document.querySelector('td[class*=\"bg-orange\"]');if(todayTd){const btn=todayTd.querySelector('button');if(btn){btn.click();await w(500);return 'ok-today';}}const dayBtns=Array.from(document.querySelectorAll('td button')).filter(b=>/^\\d{1,2}$/.test(b.innerText?.trim()));if(dayBtns.length>0){const today=new Date().getDate();const target=dayBtns.find(b=>parseInt(b.innerText?.trim())===today)||dayBtns[Math.min(14,dayBtns.length-1)];target.click();await w(500);return 'ok-day';}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return 'no-date';};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_1',ts,n:1};const testId='EB1'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const fa=document.querySelector('main')||document.body;const ni=document.querySelector('input#billNumber')||document.querySelector('input[placeholder*=\"어음번호\"]');if(ni){sv(ni,'E2E_TEST_'+testId);await w(200);}R.numOk=!!ni;const combos=Array.from(fa.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar]'));R.cc=combos.length;for(let i=0;i<combos.length;i++){R['c'+i]=await selCombo(combos[i]);}const ai=document.querySelector('input#amount')||document.querySelector('input[placeholder*=\"금액\"]');if(ai){ai.focus();await w(100);sv(ai,'20000');await w(200);ai.blur();await w(100);}R.amtOk=!!ai;for(let i=0;i<2;i++){const dtBtn=Array.from(fa.querySelectorAll('button')).find(b=>b.innerText?.includes('날짜 선택')&&b.offsetParent!==null);if(dtBtn){R['d'+i]=await pickDate(dtBtn);await w(300);}}const noteI=document.querySelector('input#note')||document.querySelector('input[placeholder*=\"비고\"]');if(noteI){sv(noteI,'E2E_TEST_어음_'+ts);await w(200);}const sub=Array.from(fa.querySelectorAll('button')).find(b=>/^(등록|저장)$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!sub){R.error='제출버튼없음';return JSON.stringify(R);}sub.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter;return JSON.stringify(R);})()",
"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 selCombo=async(cb)=>{document.body.click();await w(300);cb.scrollIntoView({block:'center'});cb.click();await w(800);const lb=document.querySelector('[role=\"listbox\"]');if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);return opt.innerText?.trim().substring(0,30);}}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return null;};const pickDate=async(trigBtn)=>{trigBtn.scrollIntoView({block:'center'});trigBtn.click();await w(800);const todayTd=document.querySelector('td[class*=\"bg-orange\"]');if(todayTd){const btn=todayTd.querySelector('button');if(btn){btn.click();await w(500);return 'ok-today';}}const dayBtns=Array.from(document.querySelectorAll('td button')).filter(b=>/^\\d{1,2}$/.test(b.innerText?.trim()));if(dayBtns.length>0){const today=new Date().getDate();const target=dayBtns.find(b=>parseInt(b.innerText?.trim())===today)||dayBtns[Math.min(14,dayBtns.length-1)];target.click();await w(500);return 'ok-day';}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return 'no-date';};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_1',ts,n:1};const testId='EB1'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const fa=document.querySelector('main')||document.body;const ni=document.querySelector('input#billNumber')||document.querySelector('input[placeholder*=\"어음번호\"]');if(ni){sv(ni,'E2E_TEST_'+testId);await w(200);}R.numOk=!!ni;const combos=Array.from(fa.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar]'));R.cc=combos.length;for(let i=0;i<combos.length;i++){R['c'+i]=await selCombo(combos[i]);}const ai=document.querySelector('input#amount')||document.querySelector('input[placeholder*=\"금액\"]');if(ai){ai.focus();await w(100);sv(ai,'20000');await w(200);ai.blur();await w(100);}R.amtOk=!!ai;for(let i=0;i<2;i++){const dtBtn=Array.from(fa.querySelectorAll('button')).find(b=>b.innerText?.includes('날짜 선택')&&b.offsetParent!==null);if(dtBtn){R['d'+i]=await pickDate(dtBtn);await w(300);}}const noteI=document.querySelector('input#note')||document.querySelector('input[placeholder*=\"비고\"]');if(noteI){sv(noteI,'E2E_TEST_EB_'+ts);await w(200);}const sub=Array.from(fa.querySelectorAll('button')).find(b=>/^(등록|저장)$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!sub){R.error='제출버튼없음';return JSON.stringify(R);}sub.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter;return JSON.stringify(R);})()",
"timeout": 60000,
"phase": "CREATE"
},
@@ -57,7 +57,7 @@
"id": 8,
"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 selCombo=async(cb)=>{document.body.click();await w(300);cb.scrollIntoView({block:'center'});cb.click();await w(800);const lb=document.querySelector('[role=\"listbox\"]');if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);return opt.innerText?.trim().substring(0,30);}}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return null;};const pickDate=async(trigBtn)=>{trigBtn.scrollIntoView({block:'center'});trigBtn.click();await w(800);const todayTd=document.querySelector('td[class*=\"bg-orange\"]');if(todayTd){const btn=todayTd.querySelector('button');if(btn){btn.click();await w(500);return 'ok-today';}}const dayBtns=Array.from(document.querySelectorAll('td button')).filter(b=>/^\\d{1,2}$/.test(b.innerText?.trim()));if(dayBtns.length>0){const today=new Date().getDate();const target=dayBtns.find(b=>parseInt(b.innerText?.trim())===today)||dayBtns[Math.min(14,dayBtns.length-1)];target.click();await w(500);return 'ok-day';}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return 'no-date';};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_2',ts,n:2};const testId='EB2'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const fa=document.querySelector('main')||document.body;const ni=document.querySelector('input#billNumber')||document.querySelector('input[placeholder*=\"어음번호\"]');if(ni){sv(ni,'E2E_TEST_'+testId);await w(200);}R.numOk=!!ni;const combos=Array.from(fa.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar]'));R.cc=combos.length;for(let i=0;i<combos.length;i++){R['c'+i]=await selCombo(combos[i]);}const ai=document.querySelector('input#amount')||document.querySelector('input[placeholder*=\"금액\"]');if(ai){ai.focus();await w(100);sv(ai,'30000');await w(200);ai.blur();await w(100);}R.amtOk=!!ai;for(let i=0;i<2;i++){const dtBtn=Array.from(fa.querySelectorAll('button')).find(b=>b.innerText?.includes('날짜 선택')&&b.offsetParent!==null);if(dtBtn){R['d'+i]=await pickDate(dtBtn);await w(300);}}const noteI=document.querySelector('input#note')||document.querySelector('input[placeholder*=\"비고\"]');if(noteI){sv(noteI,'E2E_TEST_어음_'+ts);await w(200);}const sub=Array.from(fa.querySelectorAll('button')).find(b=>/^(등록|저장)$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!sub){R.error='제출버튼없음';return JSON.stringify(R);}sub.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter;return JSON.stringify(R);})()",
"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 selCombo=async(cb)=>{document.body.click();await w(300);cb.scrollIntoView({block:'center'});cb.click();await w(800);const lb=document.querySelector('[role=\"listbox\"]');if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);return opt.innerText?.trim().substring(0,30);}}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return null;};const pickDate=async(trigBtn)=>{trigBtn.scrollIntoView({block:'center'});trigBtn.click();await w(800);const todayTd=document.querySelector('td[class*=\"bg-orange\"]');if(todayTd){const btn=todayTd.querySelector('button');if(btn){btn.click();await w(500);return 'ok-today';}}const dayBtns=Array.from(document.querySelectorAll('td button')).filter(b=>/^\\d{1,2}$/.test(b.innerText?.trim()));if(dayBtns.length>0){const today=new Date().getDate();const target=dayBtns.find(b=>parseInt(b.innerText?.trim())===today)||dayBtns[Math.min(14,dayBtns.length-1)];target.click();await w(500);return 'ok-day';}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return 'no-date';};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_2',ts,n:2};const testId='EB2'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const fa=document.querySelector('main')||document.body;const ni=document.querySelector('input#billNumber')||document.querySelector('input[placeholder*=\"어음번호\"]');if(ni){sv(ni,'E2E_TEST_'+testId);await w(200);}R.numOk=!!ni;const combos=Array.from(fa.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar]'));R.cc=combos.length;for(let i=0;i<combos.length;i++){R['c'+i]=await selCombo(combos[i]);}const ai=document.querySelector('input#amount')||document.querySelector('input[placeholder*=\"금액\"]');if(ai){ai.focus();await w(100);sv(ai,'30000');await w(200);ai.blur();await w(100);}R.amtOk=!!ai;for(let i=0;i<2;i++){const dtBtn=Array.from(fa.querySelectorAll('button')).find(b=>b.innerText?.includes('날짜 선택')&&b.offsetParent!==null);if(dtBtn){R['d'+i]=await pickDate(dtBtn);await w(300);}}const noteI=document.querySelector('input#note')||document.querySelector('input[placeholder*=\"비고\"]');if(noteI){sv(noteI,'E2E_TEST_EB_'+ts);await w(200);}const sub=Array.from(fa.querySelectorAll('button')).find(b=>/^(등록|저장)$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!sub){R.error='제출버튼없음';return JSON.stringify(R);}sub.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter;return JSON.stringify(R);})()",
"timeout": 60000,
"phase": "CREATE"
},
@@ -85,7 +85,7 @@
"id": 12,
"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 selCombo=async(cb)=>{document.body.click();await w(300);cb.scrollIntoView({block:'center'});cb.click();await w(800);const lb=document.querySelector('[role=\"listbox\"]');if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);return opt.innerText?.trim().substring(0,30);}}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return null;};const pickDate=async(trigBtn)=>{trigBtn.scrollIntoView({block:'center'});trigBtn.click();await w(800);const todayTd=document.querySelector('td[class*=\"bg-orange\"]');if(todayTd){const btn=todayTd.querySelector('button');if(btn){btn.click();await w(500);return 'ok-today';}}const dayBtns=Array.from(document.querySelectorAll('td button')).filter(b=>/^\\d{1,2}$/.test(b.innerText?.trim()));if(dayBtns.length>0){const today=new Date().getDate();const target=dayBtns.find(b=>parseInt(b.innerText?.trim())===today)||dayBtns[Math.min(14,dayBtns.length-1)];target.click();await w(500);return 'ok-day';}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return 'no-date';};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_3',ts,n:3};const testId='EB3'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const fa=document.querySelector('main')||document.body;const ni=document.querySelector('input#billNumber')||document.querySelector('input[placeholder*=\"어음번호\"]');if(ni){sv(ni,'E2E_TEST_'+testId);await w(200);}R.numOk=!!ni;const combos=Array.from(fa.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar]'));R.cc=combos.length;for(let i=0;i<combos.length;i++){R['c'+i]=await selCombo(combos[i]);}const ai=document.querySelector('input#amount')||document.querySelector('input[placeholder*=\"금액\"]');if(ai){ai.focus();await w(100);sv(ai,'40000');await w(200);ai.blur();await w(100);}R.amtOk=!!ai;for(let i=0;i<2;i++){const dtBtn=Array.from(fa.querySelectorAll('button')).find(b=>b.innerText?.includes('날짜 선택')&&b.offsetParent!==null);if(dtBtn){R['d'+i]=await pickDate(dtBtn);await w(300);}}const noteI=document.querySelector('input#note')||document.querySelector('input[placeholder*=\"비고\"]');if(noteI){sv(noteI,'E2E_TEST_어음_'+ts);await w(200);}const sub=Array.from(fa.querySelectorAll('button')).find(b=>/^(등록|저장)$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!sub){R.error='제출버튼없음';return JSON.stringify(R);}sub.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter;return JSON.stringify(R);})()",
"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 selCombo=async(cb)=>{document.body.click();await w(300);cb.scrollIntoView({block:'center'});cb.click();await w(800);const lb=document.querySelector('[role=\"listbox\"]');if(lb){const opt=lb.querySelector('[role=\"option\"]');if(opt){opt.click();await w(500);return opt.innerText?.trim().substring(0,30);}}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return null;};const pickDate=async(trigBtn)=>{trigBtn.scrollIntoView({block:'center'});trigBtn.click();await w(800);const todayTd=document.querySelector('td[class*=\"bg-orange\"]');if(todayTd){const btn=todayTd.querySelector('button');if(btn){btn.click();await w(500);return 'ok-today';}}const dayBtns=Array.from(document.querySelectorAll('td button')).filter(b=>/^\\d{1,2}$/.test(b.innerText?.trim()));if(dayBtns.length>0){const today=new Date().getDate();const target=dayBtns.find(b=>parseInt(b.innerText?.trim())===today)||dayBtns[Math.min(14,dayBtns.length-1)];target.click();await w(500);return 'ok-day';}document.dispatchEvent(new KeyboardEvent('keydown',{key:'Escape',bubbles:true}));await w(200);return 'no-date';};const ts=window.__E2E_TS__||sessionStorage.getItem('__E2E_TS__')||(()=>{const n=new Date();const p=v=>v.toString().padStart(2,'0');return n.getFullYear()+p(n.getMonth()+1)+p(n.getDate())+'_'+p(n.getHours())+p(n.getMinutes())+p(n.getSeconds());})();window.__E2E_TS__=ts;try{sessionStorage.setItem('__E2E_TS__',ts);}catch(e){}const R={phase:'CREATE_3',ts,n:3};const testId='EB3'+ts.replace(/_/g,'').substring(4,10);const btn=Array.from(document.querySelectorAll('button')).find(b=>/등록/.test(b.innerText?.trim()));if(!btn){R.error='등록 버튼 없음';return JSON.stringify(R);}btn.click();await w(2500);R.url=location.pathname+location.search;const fa=document.querySelector('main')||document.body;const ni=document.querySelector('input#billNumber')||document.querySelector('input[placeholder*=\"어음번호\"]');if(ni){sv(ni,'E2E_TEST_'+testId);await w(200);}R.numOk=!!ni;const combos=Array.from(fa.querySelectorAll('button[role=\"combobox\"]')).filter(b=>b.offsetParent!==null&&!b.closest('nav,[class*=sidebar]'));R.cc=combos.length;for(let i=0;i<combos.length;i++){R['c'+i]=await selCombo(combos[i]);}const ai=document.querySelector('input#amount')||document.querySelector('input[placeholder*=\"금액\"]');if(ai){ai.focus();await w(100);sv(ai,'40000');await w(200);ai.blur();await w(100);}R.amtOk=!!ai;for(let i=0;i<2;i++){const dtBtn=Array.from(fa.querySelectorAll('button')).find(b=>b.innerText?.includes('날짜 선택')&&b.offsetParent!==null);if(dtBtn){R['d'+i]=await pickDate(dtBtn);await w(300);}}const noteI=document.querySelector('input#note')||document.querySelector('input[placeholder*=\"비고\"]');if(noteI){sv(noteI,'E2E_TEST_EB_'+ts);await w(200);}const sub=Array.from(fa.querySelectorAll('button')).find(b=>/^(등록|저장)$/.test(b.innerText?.trim())&&b.offsetParent!==null);if(!sub){R.error='제출버튼없음';return JSON.stringify(R);}sub.click();await w(3000);R.urlAfter=location.pathname+location.search;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter;return JSON.stringify(R);})()",
"timeout": 60000,
"phase": "CREATE"
},