Files
sam-scenarios/department-add.json

184 lines
4.8 KiB
JSON
Raw Normal View History

{
"enabled": true,
"id": "department-add",
"name": "부서 추가 테스트",
"screenshotPolicy": {
"onErrorOnly": true,
"captureOn": ["error", "fail", "timeout", "404", "500", "blocked"]
},
"description": "인사관리 > 부서관리 메뉴에서 부서 추가/수정/삭제 CRUD 테스트",
"baseUrl": "https://dev.codebridge-x.com",
"menuNavigation": {
"level1": "인사관리",
"level2": "부서관리",
"expectedUrl": "/hr/department-management",
"searchWithinParent": true,
"closeOtherMenus": true
},
"auth": {
"username": "TestUser5",
"password": "password123!"
},
"testData": {
"create": {
"departmentName": "E2E_TEST_본부_{timestamp}",
"childName": "E2E_TEST_팀_{timestamp}"
}
},
"steps": [
{
"id": 1,
"name": "메뉴 진입: 인사관리 > 부서관리",
"action": "menu_navigate",
"level1": "인사관리",
"level2": "부서관리",
"expected": {
"url_contains": "/hr/department-management",
"visible": ["부서관리"]
}
},
{
"id": 2,
"name": "필수 검증 #5: 목업 페이지 감지",
"action": "verify_not_mockup",
"checks": [
"부서 목록 또는 트리 표시",
"부서 추가 버튼 존재"
],
"expected": "정상 페이지 (목업 아님)"
},
{
"id": 3,
"name": "페이지 요소 확인",
"action": "verify_element",
"checks": [
"부서 목록 또는 트리 구조 표시",
"추가 버튼 존재"
],
"expected": "부서관리 페이지 정상 표시"
},
{
"id": 4,
"phase": "CREATE",
"name": "[CREATE] 부서 추가 버튼 클릭",
"action": "click_if_exists",
"target": "button:has-text('추가'), button:has-text('등록'), button:has-text('부서 추가')",
"expected": {
"modal": true
}
},
{
"id": 5,
"phase": "CREATE",
"name": "[CREATE] 부서명 입력",
"action": "fill",
"target": "input[name*='name'], input[placeholder*='부서명'], [role='dialog'] input",
"value": "E2E_TEST_본부_{timestamp}",
"clear": true
},
{
"id": 6,
"phase": "CREATE",
"name": "[CREATE] 필수 검증 #2: 부서 등록",
"action": "click_if_exists",
"target": "button:has-text('등록'), button:has-text('저장'), button:has-text('확인')",
"verify": {
"toast": "등록|완료|성공"
},
"expected": "부서 등록 완료"
},
{
"id": "6-modal-close",
"phase": "CREATE",
"name": "[CREATE] 모달 닫기 확인",
"action": "close_modal_if_open",
"expected": "모달 닫힘"
},
{
"id": 7,
"phase": "CREATE",
"name": "[CREATE] 등록 결과 확인",
"action": "verify_detail",
"checks": [
"E2E_TEST_본부 목록에 표시"
],
"expected": "부서 등록 확인"
},
{
"id": 8,
"phase": "DELETE",
"name": "[DELETE] 부서 삭제 버튼 클릭",
"action": "click_if_exists",
"target": "button:has-text('삭제'), [aria-label='삭제']",
"expected": {
"confirm_dialog": true
}
},
{
"id": 9,
"phase": "DELETE",
"name": "[DELETE] 필수 검증 #6: 삭제 확인",
"action": "click_and_confirm",
"target": "button:has-text('확인'), button:has-text('삭제')",
"verify": {
"toast": "삭제|완료|성공"
},
"expected": "부서 삭제 완료"
},
{
"id": 10,
"phase": "DELETE",
"name": "[DELETE] 삭제 결과 확인",
"action": "verify_detail",
"checks": [
"E2E_TEST_본부 목록에서 제거"
],
"expected": {
"row_exists": false
}
}
],
"expectedAPIs": [
{
"method": "GET",
"endpoint": "/api/v1/departments",
"description": "부서 목록 조회"
},
{
"method": "POST",
"endpoint": "/api/v1/departments",
"description": "부서 등록"
},
{
"method": "DELETE",
"endpoint": "/api/v1/departments/{id}",
"description": "부서 삭제"
}
],
"requiredVerifications": [
{
"id": 2,
"name": "등록/저장 버튼",
"steps": [6],
"criteria": "API 호출 + 성공 토스트 + 데이터 반영"
},
{
"id": 5,
"name": "목업 페이지 감지",
"steps": [2],
"criteria": "부서 목록, 추가 버튼 존재"
},
{
"id": 6,
"name": "삭제 기능",
"steps": [8, 9, 10],
"criteria": "DELETE API + 목록에서 제거"
}
],
"rollbackPlan": {
"onCreateFail": "모달 닫기",
"onDeleteFail": "E2E_TEST_ 접두사 부서 수동 삭제 필요",
"cleanupRequired": "E2E_TEST_ 접두사 부서는 테스트 데이터"
}
}