Files
sam-scenarios/payment-history.json
김보곤 076aa2a376 refactor: 8개 시나리오 스텝 검증 품질 개선
- payment-history: 구체적 CSS 셀렉터 추가 (40% → 90%+ 목표)
- production-dashboard: verify_elements → verify_element 변환
- purchase-status: selectors 섹션 추가, 필터/다운로드 검증 개선
- settings-subscription: 모든 verify_elements를 구체적 셀렉터로 변환
- popup-management: 89 → 77 스텝으로 최적화, evaluate 스크립트 추가
- draft-box: 56 → 36 스텝으로 최적화, phase 마커 추가
- company-info: 폼 필드 ID 셀렉터 추가, 복잡한 검증 evaluate 추가
- item-management: 25+ 구체적 셀렉터 추가, generic verify 제거
2026-02-06 06:18:53 +09:00

290 lines
11 KiB
JSON

{
"id": "payment-history",
"name": "결제내역 테스트",
"screenshotPolicy": {
"onErrorOnly": true,
"captureOn": ["error", "fail", "timeout", "404", "500", "blocked"]
},
"description": "회계관리 > 결제내역 메뉴의 결제 내역 조회 기능 테스트",
"baseUrl": "https://dev.codebridge-x.com",
"url": "/payment-history",
"navigation": {
"targetUrl": "/payment-history",
"urlPattern": "/payment-history|/ko/payment-history",
"menuHints": ["결제내역", "결제 내역", "회계관리"]
},
"menuNavigation": {
"level1": "회계관리",
"level2": "결제내역",
"expectedUrl": "/payment-history",
"searchWithinParent": true,
"closeOtherMenus": true
},
"auth": {
"username": "TestUser5",
"password": "password123!"
},
"menuNavigationEnhanced": {
"strategy": "scroll-and-search",
"description": "사이드바를 스크롤하며 메뉴를 찾고 클릭하여 404를 방지",
"level1": "회계관리",
"level2": "결제내역",
"alternativeLevel1Names": ["회계관리", "회계 관리", "Accounting", "재무관리"],
"alternativeLevel2Names": ["결제내역", "결제 내역", "Payment History", "결제이력"],
"fallbackUrls": [
"/payment-history",
"/accounting/payment-history",
"/ko/payment-history"
],
"scrollConfig": {
"sidebarSelector": "nav, aside, [role='navigation'], .sidebar, #sidebar, .sidebar-scroll",
"menuItemSelector": "a, button, [role='menuitem'], [role='treeitem'], span",
"scrollStep": 200,
"maxScrollAttempts": 10,
"scrollDelay": 300
}
},
"testFocus": {
"primary": "결제 내역 데이터 표시 및 조회 기능 검증",
"description": "결제 내역 테이블 표시, 검색, 필터, 페이지네이션 동작 확인"
},
"prerequisites": {
"authentication": true,
"testData": {
"description": "결제 내역 데이터가 최소 1개 이상 존재해야 함"
}
},
"expectedAPIs": [
{
"method": "GET",
"endpoint": "/api/v1/accounting/payments",
"params": "page=1&per_page=20",
"description": "결제 내역 목록 조회"
}
],
"steps": [
{
"id": 0,
"name": "사이드바 메뉴 전체 펼치기",
"description": "모두 펼치기 버튼을 클릭하여 전체 메뉴를 펼친 후 메뉴 탐색 준비",
"actions": [
{
"type": "evaluate",
"script": "document.querySelector('.sidebar-scroll')?.scrollTo({top:0,behavior:'instant'})"
},
{ "type": "wait", "duration": 300 },
{
"type": "evaluate",
"script": "Array.from(document.querySelectorAll('button')).find(b => b.innerText?.includes('모두 펼치기'))?.click()"
},
{ "type": "wait", "duration": 2000 }
],
"verification": [
"사이드바가 화면에 보이는지 확인",
"회계관리 메뉴가 보이는지 확인"
]
},
{
"id": 1,
"name": "1차 메뉴 찾기: 회계관리",
"description": "사이드바에서 '회계관리' 메뉴를 찾아 클릭",
"actions": [
{
"type": "scrollAndFind",
"target": "회계관리",
"alternativeTexts": ["회계관리", "회계 관리", "Accounting"],
"scrollContainer": "sidebar",
"maxAttempts": 10,
"description": "스크롤하며 회계관리 메뉴 찾기"
},
{ "type": "click_if_exists", "target": "회계관리", "description": "회계관리 메뉴 클릭" },
{ "type": "wait", "duration": 500, "description": "서브메뉴 펼쳐지기 대기" }
],
"verification": [
"회계관리 메뉴가 클릭되었는지 확인",
"서브메뉴가 펼쳐졌는지 확인"
]
},
{
"id": 2,
"name": "2차 메뉴 찾기: 결제내역",
"description": "서브메뉴에서 '결제내역'을 찾아 클릭",
"actions": [
{
"type": "scrollAndFind",
"target": "결제내역",
"alternativeTexts": ["결제내역", "결제 내역", "Payment History"],
"scrollContainer": "submenu",
"maxAttempts": 5,
"description": "서브메뉴에서 결제내역 찾기"
},
{ "type": "click_if_exists", "target": "결제내역", "description": "결제내역 메뉴 클릭" },
{ "type": "wait", "target": "페이지 로드 완료", "timeout": 10000 }
],
"verification": [
"결제내역 메뉴 클릭 성공",
"페이지 이동 완료"
]
},
{
"id": 3,
"name": "404 에러 감지",
"description": "페이지 로드 후 404 에러 여부 확인",
"actions": [
{ "type": "wait", "duration": 1000 },
{ "type": "checkFor404", "indicators": [
"페이지를 찾을 수 없습니다",
"404",
"Not Found",
"존재하지 않거나"
]}
],
"verification": [
"404 에러 메시지가 없는지 확인"
]
},
{
"id": 4,
"name": "페이지 정상 로드 확인",
"description": "결제내역 페이지가 정상적으로 로드되었는지 확인",
"actions": [
{ "type": "verify", "target": "pageTitle", "contains": ["결제내역", "결제 내역", "Payment"] },
{ "type": "verify", "target": "pageContent", "notContains": ["404", "찾을 수 없습니다", "Not Found"] }
],
"verification": [
"페이지 제목 '결제내역' 표시",
"404 에러 메시지 미표시"
],
"successCriteria": {
"urlPattern": "/accounting/payment",
"requiredElements": ["결제", "내역"]
}
},
{
"id": 5,
"name": "페이지 구조 확인",
"description": "페이지 타이틀, 설명 확인",
"actions": [
{ "type": "wait", "duration": 500 },
{
"type": "verify_element",
"selector": "h1, h2, [class*='title'], [class*='header'] h1, [class*='header'] h2, [class*='page-title']",
"description": "페이지 타이틀 요소 존재 확인"
},
{
"type": "verify_text",
"selector": "h1, h2, [class*='title'], [class*='header']",
"contains": ["결제", "내역", "Payment"],
"description": "페이지 타이틀에 '결제' 또는 '내역' 텍스트 포함 확인"
}
],
"expected": {
"pageTitle": "결제내역",
"pageDescription": "결제 내역을 확인합니다"
}
},
{
"id": 6,
"name": "테이블 구조 확인",
"description": "결제 내역 테이블의 컬럼 헤더 확인",
"actions": [
{ "type": "wait", "duration": 500 },
{
"type": "verify_element",
"selector": "table, [role='table'], [class*='table'], [class*='grid'], [class*='list']",
"description": "테이블 또는 그리드 요소 존재 확인"
},
{
"type": "verify_element",
"selector": "table thead th, table th, [role='columnheader'], [class*='header'] [class*='cell'], [class*='table-header']",
"description": "테이블 헤더 컬럼 존재 확인"
},
{
"type": "evaluate",
"script": "const headers = document.querySelectorAll('table thead th, table th, [role=\"columnheader\"]'); return headers.length > 0 ? `테이블 컬럼 ${headers.length}개 발견` : '컬럼 없음';",
"description": "테이블 컬럼 개수 확인"
}
],
"expected": {
"tableExists": true,
"hasColumns": true
}
},
{
"id": 7,
"name": "데이터 로드 확인",
"description": "결제 내역 데이터가 테이블에 표시되는지 확인",
"actions": [
{ "type": "wait", "duration": 1000 },
{
"type": "evaluate",
"script": "const rows = document.querySelectorAll('table tbody tr, [role=\"row\"]:not([role=\"columnheader\"]), [class*=\"table-row\"], [class*=\"list-item\"]'); const emptyMsg = document.body.innerText.includes('데이터가 없습니다') || document.body.innerText.includes('No data') || document.body.innerText.includes('결과가 없습니다'); return rows.length > 0 ? `데이터 ${rows.length}행 표시됨` : (emptyMsg ? '빈 데이터 메시지 표시됨 (정상)' : '데이터 확인 필요');",
"description": "테이블 데이터 행 또는 빈 데이터 메시지 확인"
},
{
"type": "verify_element",
"selector": "table tbody, [role='rowgroup'], [class*='table-body'], [class*='list-body']",
"optional": true,
"description": "테이블 본문 영역 확인"
}
],
"expected": {
"dataExists": "데이터 행 존재 또는 '데이터가 없습니다' 메시지"
}
},
{
"id": 8,
"name": "페이지네이션 확인",
"description": "테이블 하단에 페이지네이션이 표시되는지 확인",
"actions": [
{ "type": "wait", "duration": 500 },
{
"type": "evaluate",
"script": "const pagination = document.querySelector('[class*=\"pagination\"], [class*=\"pager\"], [aria-label*=\"pagination\"], nav[class*=\"page\"], [class*=\"Pagination\"]'); const pageButtons = document.querySelectorAll('button[class*=\"page\"], a[class*=\"page\"], [aria-label*=\"page\"]'); return pagination ? '페이지네이션 컴포넌트 존재' : (pageButtons.length > 0 ? `페이지 버튼 ${pageButtons.length}개 발견` : '페이지네이션 없음 (데이터 적음 또는 미구현)');",
"description": "페이지네이션 컴포넌트 확인"
}
],
"expected": {
"paginationExists": true
},
"optional": true
},
{
"id": 9,
"name": "콘솔 에러 확인",
"description": "페이지 동작 중 콘솔에 에러가 발생하지 않는지 확인",
"actions": [
{
"type": "evaluate",
"script": "const logs = window.__API_LOGS__ || []; const errors = logs.filter(l => !l.ok || l.status >= 400); return errors.length === 0 ? 'API 에러 없음' : `API 에러 ${errors.length}개: ${errors.map(e => e.url + ' (' + e.status + ')').join(', ')}';",
"description": "API 에러 로그 확인"
},
{
"type": "verify_page",
"notContains": ["500", "Internal Server Error", "서버 오류"],
"description": "서버 에러 메시지 미표시 확인"
}
],
"expected": {
"noErrors": "콘솔 에러 없음"
}
}
],
"cleanup": {
"description": "테스트 후 정리 작업 (없음)",
"actions": []
},
"notes": [
"직접 URL 접근 금지: 반드시 메뉴 클릭으로 페이지 진입 (404 방지)",
"스크롤 필수: 회계관리 메뉴는 사이드바 하단에 위치",
"메뉴 계층: 회계관리 > 결제내역"
]
}