{ "id": "test-bills-14steps", "name": "Test bills 14 steps", "menuNavigation": { "level1": "회계관리", "level2": "어음관리" }, "steps": [ { "id": 1, "name": "[회계관리 > 어음관리] 페이지 로드 대기", "action": "wait", "timeout": 3000 }, { "id": 2, "name": "[회계관리 > 어음관리] ts 초기화", "action": "evaluate", "script": "(()=>{try{sessionStorage.removeItem('__E2E_TS__');}catch(e){}delete window.__E2E_TS__;return JSON.stringify({ok:true,cleared:true});})()", "timeout": 3000 }, { "id": 3, "name": "[회계관리 > 어음관리] 테이블 로드 대기", "action": "wait_for_table", "timeout": 5000 }, { "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;ib.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" }, { "id": 5, "name": "[회계관리 > 어음관리] [CREATE #1] 생성 후 대기", "action": "wait", "timeout": 2000 }, { "id": 6, "name": "[회계관리 > 어음관리] [CREATE #1] 목록 복귀", "action": "evaluate", "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const onForm=location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')||new RegExp('/(new|[0-9]+|[0-9a-f]{8,})$').test(location.pathname);if(onForm){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소|뒤로/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", "timeout": 10000, "phase": "CREATE" }, { "id": 7, "name": "[회계관리 > 어음관리] [CREATE #1] 목록 안정화", "action": "wait", "timeout": 1500 }, { "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;ib.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" }, { "id": 9, "name": "[회계관리 > 어음관리] [CREATE #2] 생성 후 대기", "action": "wait", "timeout": 2000 }, { "id": 10, "name": "[회계관리 > 어음관리] [CREATE #2] 목록 복귀", "action": "evaluate", "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const onForm=location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')||new RegExp('/(new|[0-9]+|[0-9a-f]{8,})$').test(location.pathname);if(onForm){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소|뒤로/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", "timeout": 10000, "phase": "CREATE" }, { "id": 11, "name": "[회계관리 > 어음관리] [CREATE #2] 목록 안정화", "action": "wait", "timeout": 1500 }, { "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;ib.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" }, { "id": 13, "name": "[회계관리 > 어음관리] [CREATE #3] 생성 후 대기", "action": "wait", "timeout": 2000 }, { "id": 14, "name": "[회계관리 > 어음관리] [CREATE #3] 목록 복귀", "action": "evaluate", "script": "(async()=>{const w=ms=>new Promise(r=>setTimeout(r,ms));const onForm=location.search.includes('mode=new')||location.search.includes('mode=edit')||location.search.includes('mode=view')||new RegExp('/(new|[0-9]+|[0-9a-f]{8,})$').test(location.pathname);if(onForm){const btn=Array.from(document.querySelectorAll('button,a')).find(b=>/목록|취소|뒤로/.test(b.innerText?.trim()));if(btn){btn.click();await w(2000);}else{history.back();await w(2000);}}return JSON.stringify({url:location.pathname+location.search});})()", "timeout": 10000, "phase": "CREATE" } ] }