Files
sam-scenarios/settings-permission.json

349 lines
9.0 KiB
JSON

{
"id": "settings-permission",
"name": "권한관리 테스트",
"screenshotPolicy": {
"onErrorOnly": true,
"captureOn": [
"error",
"fail",
"timeout",
"404",
"500",
"blocked"
]
},
"description": "설정 > 권한관리 메뉴의 권한 그룹 조회/생성/수정/삭제 및 권한 부여/회수 기능 테스트",
"baseUrl": "https://dev.codebridge-x.com",
"menuNavigation": {
"level1": "설정",
"level2": "권한관리",
"expectedUrl": "/settings/permissions",
"searchWithinParent": true,
"closeOtherMenus": true
},
"auth": {
"username": "TestUser5",
"password": "password123!"
},
"testData": {
"newRole": {
"name": "E2E_TEST_역할",
"description": "E2E 자동화 테스트용 역할"
},
"updateRole": {
"name": "E2E_TEST_역할_수정",
"description": "수정된 테스트 역할"
}
},
"steps": [
{
"id": 1,
"name": "메뉴 진입: 설정 > 권한관리",
"action": "menu_navigate",
"level1": "설정",
"level2": "권한관리",
"expected": {
"url_contains": "/settings/permissions",
"visible": [
"권한관리",
"권한"
]
}
},
{
"id": 2,
"name": "필수 검증 #5: 목업 페이지 감지",
"action": "verify_not_mockup",
"checks": [
"권한 그룹 목록 표시",
"권한 추가 버튼 존재",
"권한 설정 영역 존재"
],
"expected": "정상 페이지 (목업 아님)"
},
{
"id": 3,
"name": "권한 그룹 목록 확인",
"action": "verify_elements",
"checks": [
"권한 그룹 목록 테이블 또는 리스트",
"기본 역할 (관리자, 사용자 등) 표시",
"권한 추가 버튼"
],
"expected": "권한 목록 정상 표시"
},
{
"id": 4,
"name": "기존 권한 그룹 클릭 - 권한 목록 확인",
"action": "click_if_exists",
"target": "첫 번째 권한 그룹",
"expected": {
"visible": [
"메뉴 권한",
"기능 권한"
],
"checkboxes": true
}
},
{
"id": 5,
"name": "권한 체크박스 구조 확인",
"action": "verify_elements",
"checks": [
"메뉴별 읽기/쓰기/삭제 권한",
"전체 선택/해제 기능"
],
"expected": "권한 체크박스 매트릭스 표시"
},
{
"id": 6,
"phase": "CREATE",
"name": "[CREATE] 권한 그룹 추가 버튼 클릭",
"action": "click_if_exists",
"target": "button:has-text('추가'), button:has-text('권한 추가'), button:has-text('역할 추가')",
"expected": {
"modal": true,
"modalTitle": "권한|역할|추가"
}
},
{
"id": 7,
"phase": "CREATE",
"name": "[CREATE] 역할 정보 입력",
"action": "click_if_exists",
"fields": [
{
"name": "역할명",
"type": "text",
"value": "E2E_TEST_역할_{timestamp}"
},
{
"name": "설명",
"type": "text",
"value": "E2E 자동화 테스트용 역할"
}
]
},
{
"id": 8,
"phase": "CREATE",
"name": "[CREATE] 필수 검증 #2: 역할 저장",
"action": "click_if_exists",
"target": "button:has-text('저장'), button:has-text('추가')",
"verify": {
"url_maintained": true,
"no_error_page": true,
"api_call": "POST /api/v1/roles",
"toast": "추가|등록|완료|성공"
},
"expected": "역할 생성 완료"
},
{
"id": "8-modal-close",
"phase": "CREATE",
"name": "[CREATE] 모달 닫기 확인",
"action": "close_modal_if_open",
"expected": "모달 닫힘"
},
{
"id": 9,
"phase": "CREATE",
"name": "[CREATE] 생성된 역할 확인",
"action": "verify_detail",
"search": "E2E_TEST_역할",
"expected": {
"visible": true,
"in_list": true
}
},
{
"id": 10,
"phase": "PERMISSION",
"name": "[PERMISSION] 생성된 역할 선택",
"action": "click_if_exists",
"target": "text=E2E_TEST_역할",
"expected": {
"permission_panel": true,
"checkboxes_visible": true
}
},
{
"id": 11,
"phase": "PERMISSION",
"name": "[PERMISSION] 권한 부여 - 게시판 읽기",
"action": "click_if_exists",
"target": "checkbox:has-text('게시판'):has-text('읽기'), input[data-menu='board'][data-action='read']",
"expected": {
"checkbox_checked": true
}
},
{
"id": 12,
"phase": "PERMISSION",
"name": "[PERMISSION] 필수 검증: 권한 저장",
"action": "click_if_exists",
"target": "button:has-text('저장'), button:has-text('적용')",
"verify": {
"api_call": "PUT /api/v1/roles/",
"toast": "저장|완료|성공"
},
"expected": "권한 변경 저장"
},
{
"id": 13,
"phase": "PERMISSION",
"name": "[PERMISSION] 권한 저장 확인",
"action": "verify_detail",
"target": "게시판 읽기 권한",
"expected": {
"checked": true
},
"note": "페이지 새로고침 후에도 권한 유지 확인"
},
{
"id": 14,
"phase": "UPDATE",
"name": "[UPDATE] 역할 수정 버튼 클릭",
"action": "click_if_exists",
"target": "button:has-text('수정'), button[aria-label='수정']",
"expected": {
"modal": true,
"fields_editable": true
}
},
{
"id": 15,
"phase": "UPDATE",
"name": "[UPDATE] 역할명 수정",
"action": "click_if_exists",
"target": "input[name*='name'], input[placeholder*='역할명']",
"value": "E2E_TEST_역할_수정_{timestamp}",
"clear": true
},
{
"id": 16,
"phase": "UPDATE",
"name": "[UPDATE] 필수 검증 #2: 수정 저장",
"action": "click_if_exists",
"target": "button:has-text('저장')",
"verify": {
"api_call": "PUT /api/v1/roles/",
"toast": "수정|완료|성공"
},
"expected": "역할 수정 완료"
},
{
"id": 17,
"phase": "UPDATE",
"name": "[UPDATE] 수정 결과 확인",
"action": "verify_detail",
"search": "E2E_TEST_역할_수정",
"expected": {
"visible": true
}
},
{
"id": 18,
"phase": "DELETE",
"name": "[DELETE] 역할 삭제 버튼 클릭",
"action": "click_if_exists",
"target": "button:has-text('삭제'), button[aria-label='삭제']",
"expected": {
"confirm_dialog": true,
"dialog_message": "삭제|정말"
}
},
{
"id": 19,
"phase": "DELETE",
"name": "[DELETE] 필수 검증 #6: 삭제 확인",
"action": "click_if_exists",
"target": "button:has-text('확인'), button:has-text('삭제')",
"verify": {
"api_call": "DELETE /api/v1/roles/",
"toast": "삭제|완료|성공"
},
"expected": "역할 삭제 완료"
},
{
"id": 20,
"phase": "DELETE",
"name": "[DELETE] 삭제 결과 확인",
"action": "verify_detail",
"search": "E2E_TEST_역할_수정",
"expected": {
"visible": false,
"message": "테스트 역할이 목록에서 제거됨"
}
}
],
"expectedAPIs": [
{
"method": "GET",
"endpoint": "/api/v1/roles",
"description": "역할 목록 조회"
},
{
"method": "POST",
"endpoint": "/api/v1/roles",
"description": "역할 생성"
},
{
"method": "GET",
"endpoint": "/api/v1/roles/{id}/permissions",
"description": "역할별 권한 조회"
},
{
"method": "PUT",
"endpoint": "/api/v1/roles/{id}",
"description": "역할 정보 수정"
},
{
"method": "PUT",
"endpoint": "/api/v1/roles/{id}/permissions",
"description": "역할 권한 수정"
},
{
"method": "DELETE",
"endpoint": "/api/v1/roles/{id}",
"description": "역할 삭제"
}
],
"requiredVerifications": [
{
"id": 2,
"name": "등록/저장 버튼",
"steps": [
8,
12,
16
],
"criteria": "API 호출 + 성공 토스트 + 데이터 반영"
},
{
"id": 5,
"name": "목업 페이지 감지",
"steps": [
2
],
"criteria": "권한 목록, 추가 버튼, 권한 체크박스 존재"
},
{
"id": 6,
"name": "삭제 기능",
"steps": [
18,
19,
20
],
"criteria": "DELETE API + 목록에서 제거"
}
],
"rollbackPlan": {
"onCreateFail": "모달 닫기",
"onUpdateFail": "테스트 역할 수동 삭제 필요",
"onDeleteFail": "테스트 역할 수동 삭제 필요",
"cleanupRequired": "E2E_TEST_ 접두사 역할은 테스트 데이터"
}
}