fix: test-bills-14steps DatePicker 날짜 셀 직접 클릭 (오늘 버튼 아닌 td.bg-orange day cell)
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(600);const tb=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='오늘'&&b.offsetParent!==null);if(tb){tb.click();await w(500);return 'ok-today';}const db=document.querySelector('button[name=\"day\"]');if(db){db.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;const dbs=Array.from(fa.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);R.dc=dbs.length;for(let i=0;i<dbs.length;i++){R['d'+i]=await pickDate(dbs[i]);}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=>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;const ve=Array.from(fa.querySelectorAll('[class*=\"error\"],[class*=\"invalid\"],.text-destructive')).filter(e=>e.offsetParent!==null&&e.innerText?.trim()&&e.innerText.trim().length>1&&!e.closest('nav,[class*=sidebar]')).map(e=>e.innerText.trim()).slice(0,5);if(ve.length)R.valErrs=ve;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter+' errs='+JSON.stringify(ve);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_어음_'+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(600);const tb=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='오늘'&&b.offsetParent!==null);if(tb){tb.click();await w(500);return 'ok-today';}const db=document.querySelector('button[name=\"day\"]');if(db){db.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;const dbs=Array.from(fa.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);R.dc=dbs.length;for(let i=0;i<dbs.length;i++){R['d'+i]=await pickDate(dbs[i]);}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=>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;const ve=Array.from(fa.querySelectorAll('[class*=\"error\"],[class*=\"invalid\"],.text-destructive')).filter(e=>e.offsetParent!==null&&e.innerText?.trim()&&e.innerText.trim().length>1&&!e.closest('nav,[class*=sidebar]')).map(e=>e.innerText.trim()).slice(0,5);if(ve.length)R.valErrs=ve;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter+' errs='+JSON.stringify(ve);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_어음_'+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(600);const tb=Array.from(document.querySelectorAll('button')).find(b=>b.innerText?.trim()==='오늘'&&b.offsetParent!==null);if(tb){tb.click();await w(500);return 'ok-today';}const db=document.querySelector('button[name=\"day\"]');if(db){db.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;const dbs=Array.from(fa.querySelectorAll('button')).filter(b=>b.innerText?.trim()==='날짜 선택'&&b.offsetParent!==null);R.dc=dbs.length;for(let i=0;i<dbs.length;i++){R['d'+i]=await pickDate(dbs[i]);}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=>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;const ve=Array.from(fa.querySelectorAll('[class*=\"error\"],[class*=\"invalid\"],.text-destructive')).filter(e=>e.offsetParent!==null&&e.innerText?.trim()&&e.innerText.trim().length>1&&!e.closest('nav,[class*=sidebar]')).map(e=>e.innerText.trim()).slice(0,5);if(ve.length)R.valErrs=ve;R.ok=!R.urlAfter.includes('mode=new')&&!location.pathname.endsWith('/new');if(!R.ok)R.error='등록실패 url='+R.urlAfter+' errs='+JSON.stringify(ve);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_어음_'+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"
|
||||
},
|
||||
@@ -104,4 +104,4 @@
|
||||
"phase": "CREATE"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user