Files
sam-scenarios/hr-attendance-admin.json

311 lines
8.2 KiB
JSON

{
"id": "hr-attendance-admin",
"name": "근태관리 테스트",
"screenshotPolicy": {
"onErrorOnly": true,
"captureOn": ["error", "fail", "timeout", "404", "500", "blocked"]
},
"description": "인사관리 > 근태관리 메뉴의 관리자용 근태 조회/수정/통계 기능 테스트",
"baseUrl": "https://dev.codebridge-x.com",
"menuNavigation": {
"level1": "인사관리",
"level2": "근태관리",
"expectedUrl": "/hr/attendance-management",
"searchWithinParent": true,
"closeOtherMenus": true
},
"auth": {
"username": "TestUser5",
"password": "password123!"
},
"testData": {
"searchEmployee": "홍길동",
"dateFilter": "2026-02-03",
"updateNote": "E2E 테스트 근태 수정"
},
"steps": [
{
"id": 1,
"name": "메뉴 진입: 인사관리 > 근태관리",
"action": "menu_navigate",
"level1": "인사관리",
"level2": "근태관리",
"expected": {
"url_contains": "/hr/attendance-management",
"visible": ["근태관리"]
}
},
{
"id": 2,
"name": "필수 검증 #5: 목업 페이지 감지",
"action": "verify_not_mockup",
"checks": [
"사원별 근태 목록 표시",
"날짜 필터 존재",
"검색 기능 존재",
"통계 또는 요약 정보"
],
"expected": "정상 페이지 (목업 아님)"
},
{
"id": 3,
"name": "근태 통계 카드 확인",
"action": "verify_elements",
"checks": [
"출근 현황 카드",
"지각 현황 카드",
"결근 현황 카드"
],
"expected": "근태 통계 카드 정상 표시"
},
{
"id": 4,
"name": "근태 테이블 구조 확인",
"action": "verify_table",
"checks": [
"사원명 컬럼",
"부서 컬럼",
"날짜 컬럼",
"출근시간 컬럼",
"퇴근시간 컬럼",
"상태 컬럼"
],
"expected": "근태 테이블 컬럼 정상 표시"
},
{
"id": 5,
"phase": "FILTER",
"name": "[FILTER] 날짜 필터 선택",
"action": "click",
"target": "input[type='date'], button:has-text('날짜')",
"expected": {
"calendar_or_datepicker": true
}
},
{
"id": 6,
"phase": "FILTER",
"name": "[FILTER] 오늘 날짜 선택",
"action": "fill",
"target": "input[type='date']",
"value": "2026-02-03",
"expected": {
"data_filtered": true
}
},
{
"id": 7,
"phase": "FILTER",
"name": "[FILTER] 필터 결과 확인",
"action": "verify_elements",
"search": "2026-02-03",
"expected": {
"row_exists": true,
"filtered_by_date": true
}
},
{
"id": 8,
"phase": "SEARCH",
"name": "[SEARCH] 사원명 검색",
"action": "fill",
"target": "input[placeholder*='검색'], input[placeholder*='사원']",
"value": "홍길동",
"expected": {
"search_input": true
}
},
{
"id": 9,
"phase": "SEARCH",
"name": "[SEARCH] 검색 결과 확인",
"action": "verify_elements",
"search": "홍길동",
"expected": {
"row_exists": true,
"filtered_by_name": true
}
},
{
"id": 10,
"phase": "SEARCH",
"name": "[SEARCH] 검색 초기화",
"action": "clear",
"target": "input[placeholder*='검색'], input[placeholder*='사원']",
"expected": {
"all_data_shown": true
}
},
{
"id": 11,
"phase": "READ",
"name": "[READ] 근태 상세 보기",
"action": "click",
"target": "table tbody tr:first-child",
"expected": {
"detail_modal_or_page": true,
"visible": ["출근시간", "퇴근시간", "근무시간"]
}
},
{
"id": 12,
"phase": "READ",
"name": "[READ] 상세 정보 확인",
"action": "verify_detail",
"checks": [
"사원명 표시",
"날짜 표시",
"출근시간 표시",
"퇴근시간 표시",
"근무시간 계산"
],
"expected": "근태 상세 정보 정상 표시"
},
{
"id": 13,
"phase": "UPDATE",
"name": "[UPDATE] 근태 수정 모드 진입",
"action": "click_if_exists",
"target": "button:has-text('수정'), button:has-text('편집')",
"expected": {
"edit_mode": true,
"fields_editable": true
}
},
{
"id": 14,
"phase": "UPDATE",
"name": "[UPDATE] 비고 수정",
"action": "click_if_exists",
"target": "textarea[name*='note'], input[placeholder*='비고'], textarea[placeholder*='메모']",
"value": "E2E 테스트 근태 수정_{timestamp}",
"clear": true
},
{
"id": 15,
"phase": "UPDATE",
"name": "[UPDATE] 필수 검증 #2: 수정 저장",
"action": "click_if_exists",
"target": "button:has-text('저장'), button:has-text('확인')",
"verify": {
"url_maintained": true,
"no_error_page": true,
"api_call": "PUT /api/v1/attendances/",
"toast": "수정|완료|성공"
},
"expected": "근태 수정 완료"
},
{
"id": 16,
"phase": "UPDATE",
"name": "[UPDATE] 수정 결과 확인",
"action": "verify_detail",
"checks": [
"비고: E2E 테스트 근태 수정"
],
"expected": "수정된 데이터 반영"
},
{
"id": 17,
"phase": "EXPORT",
"name": "[EXPORT] 엑셀 다운로드 버튼 확인",
"action": "verify_elements",
"checks": [
"엑셀 다운로드 버튼 또는 내보내기 버튼"
],
"expected": "다운로드 기능 존재"
},
{
"id": 18,
"phase": "EXPORT",
"name": "[EXPORT] 엑셀 다운로드 테스트",
"action": "click",
"target": "button:has-text('엑셀'), button:has-text('내보내기'), button:has-text('다운로드')",
"verify": {
"file_download": true,
"file_type": "xlsx"
},
"expected": "엑셀 파일 다운로드"
},
{
"id": 19,
"phase": "STATS",
"name": "[STATS] 통계 탭/섹션 이동",
"action": "click",
"target": "button:has-text('통계'), a:has-text('통계'), tab:has-text('통계')",
"expected": {
"stats_view": true
}
},
{
"id": 20,
"phase": "STATS",
"name": "[STATS] 통계 데이터 확인",
"action": "verify_elements",
"checks": [
"출근율 차트 또는 수치",
"지각율 차트 또는 수치",
"결근율 차트 또는 수치"
],
"expected": "근태 통계 정상 표시"
}
],
"expectedAPIs": [
{
"method": "GET",
"endpoint": "/api/v1/attendances",
"description": "근태 목록 조회"
},
{
"method": "GET",
"endpoint": "/api/v1/attendances/summary",
"description": "근태 통계 조회"
},
{
"method": "GET",
"endpoint": "/api/v1/attendances/{id}",
"description": "근태 상세 조회"
},
{
"method": "PUT",
"endpoint": "/api/v1/attendances/{id}",
"description": "근태 수정"
},
{
"method": "GET",
"endpoint": "/api/v1/attendances/export",
"description": "근태 엑셀 다운로드"
}
],
"requiredVerifications": [
{
"id": 1,
"name": "파일 다운로드",
"steps": [18],
"criteria": "엑셀 파일 다운로드 동작"
},
{
"id": 2,
"name": "수정/저장 버튼",
"steps": [15],
"criteria": "API 호출 + 성공 토스트 + 데이터 반영"
},
{
"id": 3,
"name": "검색/필터",
"steps": [5, 6, 7, 8, 9, 10],
"criteria": "날짜 필터 및 사원 검색 기능"
},
{
"id": 5,
"name": "목업 페이지 감지",
"steps": [2],
"criteria": "근태 목록, 필터, 검색, 통계 존재"
}
],
"rollbackPlan": {
"onUpdateFail": "근태 기록은 수정만 가능, 삭제 불가",
"note": "근태 기록은 CRUD 중 CRD 없이 RU만 테스트 (시스템에서 자동 생성)"
}
}