Files
sam-scenarios/accounting-receivable.json

288 lines
7.7 KiB
JSON
Raw Permalink Normal View History

{
"id": "accounting-receivable",
"name": "미수금현황 테스트",
"screenshotPolicy": {
"onErrorOnly": true,
"captureOn": [
"error",
"fail",
"timeout",
"404",
"500",
"blocked"
]
},
"description": "회계관리 > 미수금현황 메뉴의 미수금 조회/필터/검색/엑셀 다운로드 기능 테스트",
"baseUrl": "https://dev.codebridge-x.com",
"menuNavigation": {
"level1": "회계관리",
"level2": "미수금현황",
"expectedUrl": "/accounting/receivables-status",
"searchWithinParent": true,
"closeOtherMenus": true
},
"auth": {
"username": "TestUser5",
"password": "password123!"
},
"testData": {
"filterStartDate": "2026-01-01",
"filterEndDate": "2026-02-28",
"searchKeyword": "테스트"
},
"steps": [
{
"id": 1,
"name": "메뉴 진입: 회계관리 > 미수금현황",
"action": "menu_navigate",
"level1": "회계관리",
"level2": "미수금현황",
"expected": {
"url_contains": "/accounting/receivables",
"visible": [
"미수금현황",
"미수금"
]
}
},
{
"id": 2,
"name": "URL 검증",
"action": "verify_url",
"expected": {
"url_contains": "/accounting/receivables-status"
}
},
{
"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": "verify_table",
"checks": [
"거래처 컬럼",
"미수금액 컬럼",
"매출일 컬럼",
"입금예정일 컬럼",
"연체일수 컬럼"
],
"expected": "미수금 테이블 컬럼 정상 표시"
},
{
"id": 6,
"name": "목록 필터 테스트",
"action": "evaluate",
"script": "(() => {\n const selects = document.querySelectorAll('select, [role=\"combobox\"], button[class*=\"select\"], button[class*=\"Select\"]');\n if (selects.length > 0) {\n return 'Filters found: ' + selects.length;\n }\n return 'No filter dropdowns (ok)';\n })()"
},
{
"id": 7,
"name": "통계 카드 확인",
"action": "verify_elements",
"checks": [
"총 미수금액 표시",
"정상 미수금 표시",
"연체 미수금 표시"
],
"expected": "미수금 통계 카드 표시"
},
{
"id": 8,
"phase": "FILTER",
"name": "[FILTER] 기간 필터 적용",
"action": "evaluate",
"script": "(async () => { const s = document.querySelector(\"input[type='date']:first-of-type, input[placeholder*='시작'], input[name*='start']\"); if (s) s.click(); await new Promise(r => setTimeout(r, 300)); const e = document.querySelector(\"input[type='date']:last-of-type, input[placeholder*='종료'], input[name*='end']\"); if (e) e.click(); await new Promise(r => setTimeout(r, 500)); return 'Filter inputs clicked'; })()",
"expected": {
"filter_applied": true
}
},
{
"id": 9,
"phase": "FILTER",
"name": "[FILTER] 필터 결과 확인",
"action": "verify_detail",
"expected": {
"data_filtered": true,
"table_updated": true
}
},
{
"id": 10,
"phase": "SEARCH",
"name": "[SEARCH] 거래처 검색",
"action": "click_if_exists",
"target": "input[placeholder*='검색']",
"value": "테스트",
"expected": {
"data_filtered": true
}
},
{
"id": 11,
"phase": "SEARCH",
"name": "[SEARCH] 검색 결과 확인",
"action": "verify_detail",
"search": "테스트",
"expected": {
"row_exists": true,
"filtered_by_keyword": true
}
},
{
"id": 12,
"phase": "READ",
"name": "[READ] 미수금 상세 클릭",
"action": "click_if_exists",
"target": "table tbody tr:first-child",
"expected": {
"detail_modal_or_page": true,
"visible": [
"거래처",
"미수금액",
"상세"
]
}
},
{
"id": 13,
"phase": "READ",
"name": "[READ] 상세 정보 확인",
"action": "verify_detail",
"checks": [
"거래처명 표시",
"미수금액 표시",
"매출 내역 표시"
],
"expected": "미수금 상세 정보 정상 표시"
},
{
"id": 14,
"phase": "READ",
"name": "[READ] 목록으로 복귀",
"action": "click_if_exists",
"target": "목록",
"expected": {
"url_contains": "/accounting/receivables"
}
},
{
"id": 15,
"phase": "EXPORT",
"name": "[EXPORT] 엑셀 다운로드 버튼 확인",
"action": "verify_elements",
"checks": [
"엑셀 다운로드 버튼 존재"
],
"expected": "다운로드 기능 존재"
},
{
"id": 16,
"phase": "EXPORT",
"name": "[EXPORT] 필수 검증 #1: 엑셀 다운로드",
"action": "click_if_exists",
"target": "엑셀",
"verify": {
"file_download": true,
"file_type": "xlsx",
"api_call": "GET /api/v1/receivables/export"
},
"expected": "엑셀 파일 다운로드"
},
{
"id": 17,
"phase": "SORT",
"name": "[SORT] 컬럼 정렬 테스트",
"action": "click_if_exists",
"target": "미수금액",
"expected": {
"sort_applied": true,
"data_reordered": true
}
},
{
"id": 18,
"name": "연체 현황 탭 확인",
"action": "click_if_exists",
"target": "연체",
"expected": {
"tab_active": true,
"filtered_data": true
}
},
{
"id": 19,
"name": "콘솔 에러 확인",
"action": "verify_element",
"target": "body"
}
],
"expectedAPIs": [
{
"method": "GET",
"endpoint": "/api/v1/receivables",
"description": "미수금 목록 조회"
},
{
"method": "GET",
"endpoint": "/api/v1/receivables/summary",
"description": "미수금 통계 조회"
},
{
"method": "GET",
"endpoint": "/api/v1/receivables/{id}",
"description": "미수금 상세 조회"
},
{
"method": "GET",
"endpoint": "/api/v1/receivables/export",
"description": "미수금 엑셀 다운로드"
}
],
"requiredVerifications": [
{
"id": 1,
"name": "파일 다운로드",
"steps": [
13
],
"criteria": "엑셀 파일 다운로드 동작"
},
{
"id": 3,
"name": "검색/필터",
"steps": [
5,
6,
7,
8
],
"criteria": "기간 필터 및 검색 기능"
},
{
"id": 5,
"name": "목업 페이지 감지",
"steps": [
2
],
"criteria": "미수금 목록, 필터, 다운로드 버튼 존재"
}
],
"rollbackPlan": {
"note": "미수금현황은 조회 전용 페이지로 CRUD 없음 (데이터 생성/수정/삭제 없음)"
}
}