Files
sam-scenarios/purchase-order.json

33 lines
3.0 KiB
JSON
Raw Normal View History

{
"id": "purchase-order",
"name": "발주관리 테스트",
"screenshotPolicy": {
"onErrorOnly": true,
"captureOn": ["error", "fail", "timeout", "404", "500", "blocked"]
},
"description": "구매관리 > 발주관리 메뉴의 발주 조회/등록/검색 기능 테스트",
"baseUrl": "https://dev.codebridge-x.com",
"menuNavigation": {
"level1": "구매관리",
"level2": "발주관리",
"expectedUrl": "/purchase/order",
"searchWithinParent": true,
"closeOtherMenus": true
},
"auth": { "username": "TestUser5", "password": "password123!" },
"steps": [
{ "id": 1, "name": "메뉴 진입: 구매관리 > 발주관리", "action": "menu_navigate", "level1": "구매관리", "level2": "발주관리", "expected": { "url_contains": "/purchase", "visible": ["발주"] } },
{ "id": 2, "name": "페이지 로드 대기", "action": "wait", "timeout": 3000 },
{ "id": 3, "name": "필수 검증: 목업 페이지 감지", "action": "verify_not_mockup", "checks": ["발주 목록 표시", "버튼 동작 가능"], "expected": "정상 페이지 (목업 아님)" },
{ "id": 4, "name": "콘텐츠 로드 대기", "action": "wait", "timeout": 2000 },
{ "id": 5, "name": "페이지 구조 확인", "action": "evaluate", "script": "(() => { const tables = document.querySelectorAll('table'); const lists = document.querySelectorAll('[class*=\"list\"], [class*=\"grid\"], [class*=\"card\"]'); return 'Tables: ' + tables.length + ', Lists/Cards: ' + lists.length; })()" },
{ "id": 6, "phase": "SEARCH", "name": "[SEARCH] 검색 입력", "action": "click_if_exists", "target": "input[type='search'], input[placeholder*='검색'], input[type='text']", "expected": "검색 필드 존재 확인" },
{ "id": 8, "phase": "FILTER", "name": "[FILTER] 필터 존재 확인", "action": "evaluate", "script": "(() => { const selects = document.querySelectorAll('select, [role=\"combobox\"], button[class*=\"select\"]'); return selects.length > 0 ? 'Filters: ' + selects.length : 'No filters (ok)'; })()" },
{ "id": 9, "name": "등록 버튼 확인", "action": "evaluate", "script": "(() => { const btn = Array.from(document.querySelectorAll('button')).find(b => ['등록','신규','추가','발주'].some(t => b.innerText?.includes(t))); return btn ? 'Create button: ' + btn.innerText.trim() : 'No create button (ok)'; })()" },
{ "id": 10, "name": "상세 행 클릭", "action": "click_if_exists", "target": "table tbody tr:first-child", "expected": { "detail_view": true } },
{ "id": 11, "name": "상세 정보 확인", "action": "verify_detail", "checks": ["발주 상세 정보 표시 또는 데이터 없음"], "expected": "상세 정보 표시" },
{ "id": 12, "name": "목록으로 돌아가기", "action": "click_if_exists", "target": "button:has-text('목록'), a:has-text('목록'), [class*='back']", "expected": "목록 페이지로 복귀" },
{ "id": 13, "name": "콘솔 에러 확인", "action": "verify_element", "target": "body" }
],
"rollbackPlan": { "note": "조회 위주 테스트로 데이터 변경 최소" }
}