Files
sam-scenarios/accounting-bad-debt.json

319 lines
8.9 KiB
JSON
Raw Normal View History

{
"id": "accounting-bad-debt",
"name": "악성채권추심관리 테스트",
"screenshotPolicy": {
"onErrorOnly": true,
"captureOn": [
"error",
"fail",
"timeout",
"404",
"500",
"blocked"
]
},
"description": "회계관리 > 악성채권추심관리 메뉴의 악성채권 CRUD 기능 테스트",
"baseUrl": "https://dev.codebridge-x.com",
"menuNavigation": {
"level1": "회계관리",
"level2": "악성채권추심관리",
"expectedUrl": "/accounting/bad-debt-collection",
"searchWithinParent": true,
"closeOtherMenus": true
},
"auth": {
"username": "TestUser5",
"password": "password123!"
},
"testData": {
"create": {
"vendorName": "E2E_TEST_채권거래처_{timestamp}",
"debtAmount": "1000000",
"status": "추심중"
}
},
"steps": [
{
"id": 1,
"name": "메뉴 진입: 회계관리 > 악성채권추심관리",
"action": "menu_navigate",
"level1": "회계관리",
"level2": "악성채권추심관리",
"expected": {
"url_contains": "/accounting",
"visible": [
"악성채권",
"추심"
]
}
},
{
"id": 2,
"name": "URL 검증",
"action": "verify_url",
"expected": {
"url_contains": "/accounting/bad-debt-collection"
}
},
{
"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": "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_open": true
}
},
{
"id": 9,
"phase": "CREATE",
"name": "[CREATE] 거래처 선택",
"action": "click_if_exists",
"target": "select[name*='vendor'], input[placeholder*='거래처']",
"expected": "거래처 선택 가능"
},
{
"id": 10,
"phase": "CREATE",
"name": "[CREATE] 채권금액 입력",
"action": "click_if_exists",
"target": "input[name*='amount'], input[placeholder*='금액']"
},
{
"id": 11,
"phase": "CREATE",
"name": "[CREATE] 필수 검증 #2: 채권 저장",
"action": "click_if_exists",
"target": "button:has-text('저장'), button:has-text('등록'), button:has-text('확인'), button:has-text('추가')",
"verify": {
"url_maintained": true,
"no_error_page": true,
"api_call": "POST /api/v1/accounting/bad-debts",
"toast": "등록|저장|완료|성공"
},
"expected": "채권 등록 완료"
},
{
"id": 12,
"phase": "CREATE",
"name": "[CREATE] 저장 완료 토스트 확인",
"action": "verify_toast",
"verify": {
"contains": "등록|완료|성공|저장"
}
},
{
"id": 13,
"phase": "READ",
"name": "[READ] 등록된 채권 검색",
"action": "click_if_exists",
"target": "input[type='search'], input[placeholder*='검색']"
},
{
"id": 14,
"phase": "READ",
"name": "[READ] 등록된 채권 확인",
"action": "verify_detail",
"checks": [
"E2E_TEST_채권거래처 목록에 표시"
],
"expected": "등록된 채권 확인"
},
{
"id": 15,
"phase": "READ",
"name": "[READ] 채권 상세 조회",
"action": "click_if_exists",
"target": "table tbody tr:has-text('E2E_TEST_채권거래처')",
"expected": {
"detail_view": true
}
},
{
"id": 16,
"name": "상세 정보 확인",
"action": "verify_elements",
"checks": [
"거래처 정보 표시",
"채권금액 표시",
"추심 이력 표시"
],
"expected": "상세 정보 표시"
},
{
"id": 17,
"phase": "UPDATE",
"name": "[UPDATE] 상태 변경",
"action": "click_if_exists",
"target": "button:has-text('상태변경'), select[name*='status']",
"expected": "상태 변경 가능"
},
{
"id": 18,
"phase": "UPDATE",
"name": "[UPDATE] 추심 메모 추가",
"action": "click_if_exists",
"target": "textarea[name*='memo'], textarea[placeholder*='메모']"
},
{
"id": 19,
"phase": "UPDATE",
"name": "[UPDATE] 변경 저장",
"action": "click_if_exists",
"target": "button:has-text('저장'), button:has-text('확인')",
"verify": {
"api_call": "PUT /api/v1/accounting/bad-debts",
"toast": "수정|저장|완료|성공"
},
"expected": "채권 정보 수정 완료"
},
{
"id": 20,
"phase": "UPDATE",
"name": "[UPDATE] 수정 완료 토스트 확인",
"action": "verify_toast",
"verify": {
"contains": "수정|완료|성공|저장"
}
},
{
"id": 21,
"phase": "DELETE",
"name": "[DELETE] 채권 삭제",
"action": "click_if_exists",
"target": "button:has-text('삭제'), button:has-text('제거')",
"expected": {
"confirm_dialog": true
}
},
{
"id": 22,
"phase": "DELETE",
"name": "[DELETE] 삭제 확인",
"action": "click_if_exists",
"target": "[role='alertdialog'] button:has-text('확인'), [role='dialog'] button:has-text('삭제')",
"verify": {
"api_call": "DELETE /api/v1/accounting/bad-debts",
"toast": "삭제|제거|완료|성공"
},
"expected": "채권 삭제 완료"
},
{
"id": 23,
"phase": "DELETE",
"name": "[DELETE] 삭제 확인",
"action": "verify_detail",
"checks": [
"E2E_TEST_채권거래처 목록에서 제거"
],
"expected": "채권 삭제 반영"
},
{
"id": 24,
"name": "콘솔 에러 확인",
"action": "verify_element",
"target": "body"
}
],
"expectedAPIs": [
{
"method": "GET",
"endpoint": "/api/v1/accounting/bad-debts",
"description": "악성채권 목록 조회"
},
{
"method": "POST",
"endpoint": "/api/v1/accounting/bad-debts",
"description": "악성채권 등록"
},
{
"method": "GET",
"endpoint": "/api/v1/accounting/bad-debts/:id",
"description": "악성채권 상세 조회"
},
{
"method": "PUT",
"endpoint": "/api/v1/accounting/bad-debts/:id",
"description": "악성채권 수정"
},
{
"method": "DELETE",
"endpoint": "/api/v1/accounting/bad-debts/:id",
"description": "악성채권 삭제"
}
],
"requiredVerifications": [
{
"id": 2,
"name": "저장 버튼",
"steps": [
8,
15
],
"criteria": "API 호출 + 성공 토스트 + 데이터 반영"
},
{
"id": 5,
"name": "목업 페이지 감지",
"steps": [
2
],
"criteria": "악성채권 목록, 등록 버튼, 상태 필터 존재"
}
],
"rollbackPlan": {
"onCreateFail": "등록 모달 닫고 재시도",
"onUpdateFail": "페이지 새로고침 후 재시도",
"onDeleteFail": "수동 삭제 필요",
"cleanupRequired": "E2E_TEST_채권거래처* 패턴 데이터 삭제"
}
}