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:
@@ -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"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user