183 lines
7.8 KiB
JSON
183 lines
7.8 KiB
JSON
{
|
|
"id": "material-dispatch",
|
|
"name": "배차차량관리 목록/검색/상세/등록폼/필터/페이지네이션 테스트",
|
|
"version": "2.0.0",
|
|
"screenshotPolicy": {
|
|
"onErrorOnly": true,
|
|
"captureOn": ["error", "fail", "timeout", "404", "500", "blocked"]
|
|
},
|
|
"description": "출고관리 > 배차차량관리 메뉴의 배차/차량 목록 조회, 검색, 필터, 등록폼, 상세 조회, 페이지네이션 기능 검증",
|
|
"baseUrl": "https://dev.codebridge-x.com",
|
|
"menuNavigation": {
|
|
"level1": "출고관리",
|
|
"level2": "배차차량관리",
|
|
"expectedUrl": "/outbound/vehicle-dispatches",
|
|
"searchWithinParent": true,
|
|
"closeOtherMenus": true
|
|
},
|
|
"auth": { "username": "TestUser5", "password": "password123!" },
|
|
"steps": [
|
|
{
|
|
"id": 1,
|
|
"name": "메뉴 진입: 출고관리 > 배차차량관리",
|
|
"action": "menu_navigate",
|
|
"level1": "출고관리",
|
|
"level2": "배차차량관리",
|
|
"expected": { "url_contains": "/outbound", "visible": ["배차", "차량"] }
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "URL 검증",
|
|
"action": "verify_url",
|
|
"expected": { "url_contains": "/outbound/vehicle-dispatches" }
|
|
},
|
|
{
|
|
"id": 3,
|
|
"name": "필수 검증: 목업 페이지 감지",
|
|
"action": "verify_not_mockup",
|
|
"checks": ["배차/차량 목록 표시", "등록/추가 버튼 존재", "검색/필터 기능 존재"],
|
|
"expected": "정상 페이지 (목업 아님)"
|
|
},
|
|
{
|
|
"id": 4,
|
|
"name": "페이지 로드 대기",
|
|
"action": "wait",
|
|
"timeout": 3000
|
|
},
|
|
{
|
|
"id": 5,
|
|
"name": "통계 카드 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const cards = document.querySelectorAll('[class*=\"card\"], [class*=\"Card\"], [class*=\"stat\"], [class*=\"Stat\"], [class*=\"summary\"]'); const texts = Array.from(cards).map(c => c.innerText?.substring(0, 30)).filter(Boolean); return texts.length > 0 ? 'Stats: ' + texts.length + ' cards found' : 'No stat cards (ok)'; })()"
|
|
},
|
|
{
|
|
"id": 6,
|
|
"name": "배차/차량 테이블 구조 확인",
|
|
"action": "verify_table",
|
|
"checks": ["차량번호 또는 배차 컬럼", "운전자 또는 담당자 컬럼"],
|
|
"expected": "배차/차량 테이블 컬럼 정상 표시"
|
|
},
|
|
{
|
|
"id": 7,
|
|
"name": "테이블 데이터 행 수 및 헤더 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const rows = document.querySelectorAll('table tbody tr'); const headers = Array.from(document.querySelectorAll('table thead th, table th')).map(h => h.innerText?.trim()).filter(Boolean); return 'Table rows: ' + rows.length + ', Headers: ' + JSON.stringify(headers.slice(0, 8)); })()"
|
|
},
|
|
{
|
|
"id": 8,
|
|
"name": "탭/필터 UI 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const tabs = document.querySelectorAll('[role=\"tab\"], [class*=\"tab\"]'); const selects = document.querySelectorAll('select, [role=\"combobox\"], button[class*=\"select\"], button[class*=\"Select\"]'); return 'Tabs: ' + tabs.length + ', Filters/Selects: ' + selects.length; })()"
|
|
},
|
|
{
|
|
"id": 9,
|
|
"phase": "SEARCH",
|
|
"name": "[SEARCH] 검색 기능 테스트",
|
|
"action": "search",
|
|
"value": "테스트"
|
|
},
|
|
{
|
|
"id": 10,
|
|
"phase": "SEARCH",
|
|
"name": "[SEARCH] 검색 결과 대기",
|
|
"action": "wait",
|
|
"duration": 1000
|
|
},
|
|
{
|
|
"id": 11,
|
|
"phase": "SEARCH",
|
|
"name": "[SEARCH] 검색 결과 데이터 검증",
|
|
"action": "evaluate",
|
|
"script": "(() => { const rows = document.querySelectorAll('table tbody tr, [role=\"row\"]'); return 'Search result: ' + rows.length + ' rows'; })()"
|
|
},
|
|
{
|
|
"id": 12,
|
|
"phase": "SEARCH",
|
|
"name": "[SEARCH] 검색 초기화",
|
|
"action": "evaluate",
|
|
"script": "(() => { const selectors = ['input[type=\"search\"]', 'input[placeholder*=\"검색\"]', 'input[placeholder*=\"Search\"]', 'input[role=\"searchbox\"]', '[class*=\"search\"] input']; for (const sel of selectors) { const el = document.querySelector(sel); if (el) { const nativeSetter = Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value')?.set; if (nativeSetter) nativeSetter.call(el, ''); else el.value = ''; el.dispatchEvent(new Event('input', { bubbles: true })); el.dispatchEvent(new Event('change', { bubbles: true })); return 'Search cleared'; } } return 'No search input found (ok)'; })()"
|
|
},
|
|
{
|
|
"id": 13,
|
|
"phase": "SEARCH",
|
|
"name": "[SEARCH] 초기화 후 대기",
|
|
"action": "wait",
|
|
"duration": 1000
|
|
},
|
|
{
|
|
"id": 14,
|
|
"phase": "SEARCH",
|
|
"name": "[SEARCH] 초기화 후 목록 복원 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const rows = document.querySelectorAll('table tbody tr, [role=\"row\"]'); return 'Restored: ' + rows.length + ' rows'; })()"
|
|
},
|
|
{
|
|
"id": 15,
|
|
"phase": "CREATE",
|
|
"name": "[CREATE] 등록/추가 버튼 클릭",
|
|
"action": "click_if_exists",
|
|
"target": "button:has-text('등록'), button:has-text('추가'), button:has-text('신규'), button:has-text('차량 등록'), button:has-text('배차 등록')",
|
|
"expected": { "modal_or_page": true }
|
|
},
|
|
{
|
|
"id": 16,
|
|
"phase": "CREATE",
|
|
"name": "[CREATE] 등록 폼 요소 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const modal = document.querySelector('[role=\"dialog\"], [aria-modal=\"true\"], [class*=\"modal\"]:not([class*=\"tooltip\"]), [class*=\"Modal\"]'); const scope = modal || document; const inputs = scope.querySelectorAll('input:not([type=\"hidden\"]), textarea, select'); const labels = Array.from(scope.querySelectorAll('label')).map(l => l.innerText?.trim()).filter(Boolean).slice(0, 10); return 'Form inputs: ' + inputs.length + ', Labels: ' + JSON.stringify(labels); })()"
|
|
},
|
|
{
|
|
"id": 17,
|
|
"phase": "CREATE",
|
|
"name": "[CREATE] 등록 모달 닫기",
|
|
"action": "close_modal_if_open",
|
|
"expected": "모달 닫힘"
|
|
},
|
|
{
|
|
"id": 18,
|
|
"phase": "READ",
|
|
"name": "[READ] 첫 번째 행 클릭 (상세 조회)",
|
|
"action": "click_if_exists",
|
|
"target": "table tbody tr:first-child"
|
|
},
|
|
{
|
|
"id": 19,
|
|
"phase": "READ",
|
|
"name": "[READ] 상세 정보 확인",
|
|
"action": "verify_detail",
|
|
"checks": ["배차/차량 상세 정보 표시 또는 데이터 없음"],
|
|
"expected": "상세 정보 표시"
|
|
},
|
|
{
|
|
"id": 20,
|
|
"phase": "READ",
|
|
"name": "[READ] 상세 모달 닫기",
|
|
"action": "close_modal_if_open",
|
|
"expected": "모달 닫힘"
|
|
},
|
|
{
|
|
"id": 21,
|
|
"name": "페이지네이션 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const paginationSels = ['[class*=\"pagination\"]', '[class*=\"Pagination\"]', 'nav[aria-label*=\"page\"]', 'button[aria-label*=\"page\"]', '[class*=\"pager\"]']; for (const sel of paginationSels) { const el = document.querySelector(sel); if (el) return 'Pagination found'; } const pageButtons = Array.from(document.querySelectorAll('button')).filter(b => /^\\d+$/.test(b.innerText?.trim())); if (pageButtons.length > 0) return 'Page buttons found: ' + pageButtons.length; return 'No pagination (ok - may have single page)'; })()"
|
|
},
|
|
{
|
|
"id": 22,
|
|
"name": "콘솔 에러 확인",
|
|
"action": "verify_element",
|
|
"target": "body"
|
|
},
|
|
{
|
|
"id": 23,
|
|
"name": "배차차량관리 페이지 최종 확인",
|
|
"action": "verify_elements",
|
|
"checks": ["배차/차량 목록 구조 정상", "등록 버튼 존재"],
|
|
"expected": "배차차량관리 페이지 정상"
|
|
}
|
|
],
|
|
"expectedAPIs": [
|
|
{ "method": "GET", "endpoint": "/api/v1/shipment/dispatch", "description": "배차차량 목록 조회" }
|
|
],
|
|
"rollbackPlan": { "note": "READ-only 패턴으로 안정성 우선" }
|
|
}
|