fix: 어음관리 시나리오 어음번호 입력 오류 오탐 수정

- batch-create-acc-bills.json: valErrs 필터 개선 (필수항목 마커 *, 짧은 라벨 텍스트 제외)
- batch-create-acc-bills.json: 성공 판정에 API POST / 토스트 대안 지표 추가
- 4개 시나리오: numInput 셀렉터에 input#billNumber 우선 탐색 추가
  (batch-create, full-crud, create-delete, reload-persist)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-26 10:54:07 +09:00
parent 6107aa0e27
commit d14621dd33
4 changed files with 6 additions and 6 deletions

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='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.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;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#billNumber,input[name*=\"billNumber\"],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.ok=true;return JSON.stringify(R);})()",
"timeout": 30000,
"phase": "CREATE"
},