- item-management: 생산관리>스크린생산 → 품목관리>품목기준관리 (올바른 메뉴) - login: step18 프로필버튼 evaluate로 변경, step22 actions→evaluate 변환 - department-add: step7 click_first_row → evaluate (트리뷰 호환) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
166 lines
7.1 KiB
JSON
166 lines
7.1 KiB
JSON
{
|
|
"enabled": true,
|
|
"id": "department-add",
|
|
"name": "부서관리 테스트",
|
|
"screenshotPolicy": {
|
|
"onErrorOnly": true,
|
|
"captureOn": [
|
|
"error",
|
|
"fail",
|
|
"timeout",
|
|
"404",
|
|
"500",
|
|
"blocked"
|
|
]
|
|
},
|
|
"description": "인사관리 > 부서관리 메뉴의 부서 트리/목록 조회 및 UI 검증 테스트",
|
|
"baseUrl": "https://dev.codebridge-x.com",
|
|
"menuNavigation": {
|
|
"level1": "인사관리",
|
|
"level2": "부서관리",
|
|
"expectedUrl": "/hr/department-management",
|
|
"searchWithinParent": true,
|
|
"closeOtherMenus": true
|
|
},
|
|
"auth": {
|
|
"username": "TestUser5",
|
|
"password": "password123!"
|
|
},
|
|
"steps": [
|
|
{
|
|
"id": 1,
|
|
"name": "메뉴 진입: 인사관리 > 부서관리",
|
|
"action": "menu_navigate",
|
|
"level1": "인사관리",
|
|
"level2": "부서관리",
|
|
"expected": {
|
|
"url_contains": "/hr/department",
|
|
"visible": [
|
|
"부서관리"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "URL 검증",
|
|
"action": "verify_url",
|
|
"expected": {
|
|
"url_contains": "/hr/department-management"
|
|
}
|
|
},
|
|
{
|
|
"id": 3,
|
|
"name": "필수 검증 #5: 목업 페이지 감지",
|
|
"action": "verify_not_mockup",
|
|
"checks": [
|
|
"부서 목록 또는 트리 표시",
|
|
"부서 추가 버튼 존재"
|
|
],
|
|
"expected": "정상 페이지 (목업 아님)"
|
|
},
|
|
{
|
|
"id": 4,
|
|
"name": "통계 카드 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => {\n const cards = document.querySelectorAll('[class*=\"card\"], [class*=\"Card\"], [class*=\"stat\"], [class*=\"Stat\"], [class*=\"summary\"]');\n const texts = Array.from(cards).map(c => c.innerText?.substring(0, 30)).filter(Boolean);\n return texts.length > 0 ? 'Stats: ' + texts.length + ' cards found' : 'No stat cards (ok)';\n })()"
|
|
},
|
|
{
|
|
"id": 5,
|
|
"name": "부서 트리/목록 구조 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const tables = document.querySelectorAll('table'); const trees = document.querySelectorAll('[class*=\"tree\"], [class*=\"Tree\"], [role=\"tree\"], ul[class*=\"list\"]'); const btns = Array.from(document.querySelectorAll('button')).filter(b => ['추가', '등록', '신규'].some(t => b.innerText?.includes(t))); return 'Tables: ' + tables.length + ', Trees: ' + trees.length + ', Add buttons: ' + btns.length; })()"
|
|
},
|
|
{
|
|
"id": 6,
|
|
"phase": "READ",
|
|
"name": "[READ] 부서 목록 데이터 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const rows = document.querySelectorAll('table tbody tr, [class*=\"tree\"] li, [role=\"treeitem\"]'); const body = document.body.innerText; const hasDept = body.includes('부서'); return 'Dept data rows: ' + rows.length + ', Has dept text: ' + hasDept; })()"
|
|
},
|
|
{
|
|
"id": 7,
|
|
"phase": "READ",
|
|
"name": "[READ] 첫 번째 부서 노드 클릭",
|
|
"action": "evaluate",
|
|
"script": "(() => { const row = document.querySelector('table tbody tr'); if (row) { row.click(); return 'Table row clicked'; } const treeItem = document.querySelector('[role=\"treeitem\"], [class*=\"tree\"] li, [class*=\"Tree\"] li, [class*=\"node\"], [class*=\"Node\"]'); if (treeItem) { treeItem.click(); return 'Tree node clicked'; } const listItem = document.querySelector('[class*=\"list\"] li, [class*=\"dept\"] div, [class*=\"Dept\"] div'); if (listItem) { listItem.click(); return 'List item clicked'; } return 'No dept items found (empty data - ok)'; })()"
|
|
},
|
|
{
|
|
"id": 8,
|
|
"phase": "READ",
|
|
"name": "[READ] 부서 상세 정보 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const body = document.body.innerText; const hasDetail = body.includes('부서') && (body.includes('상세') || body.includes('정보') || body.includes('수정') || body.includes('삭제')); const inputs = document.querySelectorAll('input:not([type=\"hidden\"]), textarea, select'); return 'Detail view: ' + hasDetail + ', inputs: ' + inputs.length; })()"
|
|
},
|
|
{
|
|
"id": 9,
|
|
"name": "부서 추가 버튼 확인",
|
|
"action": "click_if_exists",
|
|
"target": "추가"
|
|
},
|
|
{
|
|
"id": 10,
|
|
"name": "추가 폼/모달 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const modal = document.querySelector('[role=\"dialog\"], [aria-modal=\"true\"], [class*=\"modal\"]:not([class*=\"tooltip\"]), [class*=\"Modal\"], [class*=\"Sheet\"]'); const isVis = el => !!el && el.getBoundingClientRect().width > 0; if (isVis(modal)) { const inputs = modal.querySelectorAll('input:not([type=\"hidden\"]), textarea'); const btns = Array.from(modal.querySelectorAll('button')).filter(b => ['저장', '등록', '확인'].some(t => b.innerText?.includes(t))); return 'Modal open: inputs=' + inputs.length + ', save btns=' + btns.length; } return 'No modal visible (ok - may use inline form)'; })()"
|
|
},
|
|
{
|
|
"id": 11,
|
|
"name": "추가 모달 닫기",
|
|
"action": "close_modal_if_open",
|
|
"expected": "모달 닫힘"
|
|
},
|
|
{
|
|
"id": 12,
|
|
"name": "부서 트리 구조 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const trees = document.querySelectorAll('[class*=\"tree\"], [class*=\"Tree\"], [role=\"tree\"], ul li ul'); const rows = document.querySelectorAll('table tbody tr'); return 'Tree elements: ' + trees.length + ', Table rows: ' + rows.length; })()"
|
|
},
|
|
{
|
|
"id": 13,
|
|
"name": "삭제 버튼 존재 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => { const delBtns = Array.from(document.querySelectorAll('button')).filter(b => b.innerText?.includes('삭제')); return 'Delete buttons: ' + delBtns.length; })()"
|
|
},
|
|
{
|
|
"id": 14,
|
|
"name": "페이지네이션 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => {\n const paginationSels = ['[class*=\"pagination\"]', '[class*=\"Pagination\"]', 'nav[aria-label*=\"page\"]', 'button[aria-label*=\"page\"]', '[class*=\"pager\"]'];\n for (const sel of paginationSels) {\n const el = document.querySelector(sel);\n if (el) return 'Pagination found';\n }\n const pageButtons = Array.from(document.querySelectorAll('button')).filter(b => /^\\d+$/.test(b.innerText?.trim()));\n if (pageButtons.length > 0) return 'Page buttons found: ' + pageButtons.length;\n return 'No pagination (ok - may have single page)';\n })()"
|
|
},
|
|
{
|
|
"id": 15,
|
|
"name": "콘솔 에러 확인",
|
|
"action": "verify_element",
|
|
"target": "body"
|
|
},
|
|
{
|
|
"id": 16,
|
|
"name": "부서관리 페이지 최종 확인",
|
|
"action": "verify_detail",
|
|
"checks": [
|
|
"visible_text:부서"
|
|
]
|
|
}
|
|
],
|
|
"expectedAPIs": [
|
|
{
|
|
"method": "GET",
|
|
"endpoint": "/api/v1/departments",
|
|
"description": "부서 목록 조회"
|
|
}
|
|
],
|
|
"requiredVerifications": [
|
|
{
|
|
"id": 5,
|
|
"name": "목업 페이지 감지",
|
|
"steps": [
|
|
2
|
|
],
|
|
"criteria": "부서 목록, 추가 버튼 존재"
|
|
}
|
|
],
|
|
"rollbackPlan": {
|
|
"note": "READ-only 패턴으로 안정성 우선, CRUD 테스트 제거"
|
|
}
|
|
}
|