{ "id": "inspection-management", "name": "검사관리 테스트", "screenshotPolicy": { "onErrorOnly": true, "captureOn": ["error", "fail", "timeout", "404", "500", "blocked"] }, "description": "품질관리 > 검사관리 페이지의 검사 등록/조회/수정/삭제 기능을 테스트하는 E2E 테스트", "baseUrl": "https://dev.codebridge-x.com", "url": "/quality/inspection", "menuNavigation": { "level1": "품질관리", "level2": "검사관리", "expectedUrl": "/quality/inspection" }, "menuNavigationEnhanced": { "strategy": "scroll-and-search", "sidebar": { "scrollContainer": ".sidebar-scroll", "scrollStep": 200, "maxScrollAttempts": 5, "waitAfterScroll": 300 }, "level1": { "text": "품질관리", "expandable": true, "waitAfterClick": 500 }, "level2": { "text": "검사관리", "waitAfterClick": 300 }, "fallbackUrl": "/quality/inspection", "expectedUrl": "/quality/inspection" }, "timeout": 90000, "tags": ["quality", "inspection", "crud"], "login": { "url": "https://dev.codebridge-x.com/login", "credentials": { "id": "TestUser5", "password": "password123!" }, "successIndicator": "대시보드" }, "testData": { "inspection": { "quantity": "100", "worker": "홍킬동", "note": "E2E 테스트 특이사항", "height": "50.5", "length": "120.3" } }, "steps": [ { "id": "step-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 } ], "expect": { "sidebarReady": true } }, { "id": "step-1", "name": "품질관리 메뉴 진입", "description": "품질관리 > 검사관리 메뉴로 이동", "actions": [ { "type": "scrollAndFind", "container": ".sidebar-scroll", "target": "품질관리", "scrollStep": 200, "maxAttempts": 5 }, { "type": "click", "target": "품질관리" }, { "type": "wait", "duration": 500 }, { "type": "click", "target": "검사관리" } ], "expect": { "url": "/quality/inspection", "visible": ["검사 목록", "품질검사 관리", "검사 등록"] }, "fallback": { "type": "navigate", "url": "/quality/inspection" } }, { "id": "step-2", "name": "페이지 구조 확인", "description": "통계 카드와 테이블 구조 확인", "verify": { "visible": ["금일 대기 건수", "진행 중 검사", "금일 완료 건수", "불량 발생률"], "tableColumns": ["번호", "검사유형", "요청일", "품목명", "LOT NO", "상태", "담당자"] } }, { "id": "step-3", "name": "탭 기능 확인", "description": "전체/대기/진행중/완료 탭 동작 확인", "actions": [ { "type": "click", "target": "대기", "role": "tab" }, { "type": "wait", "duration": 300 }, { "type": "click", "target": "진행중", "role": "tab" }, { "type": "wait", "duration": 300 }, { "type": "click", "target": "완료", "role": "tab" }, { "type": "wait", "duration": 300 }, { "type": "click", "target": "전체", "role": "tab" } ], "expect": { "tabsWork": true } }, { "id": "step-4", "name": "필수 검증 #2: 검사 등록 모달 열기", "description": "검사 등록 버튼 클릭하여 모달 열기", "actions": [ { "type": "openModal", "target": "검사 등록", "description": "품질검사 등록 모달 열기" } ], "modalConfig": { "containerSelector": "[role='dialog'], .modal", "animationDelay": 300, "waitForSelector": "[role='dialog']" }, "expect": { "modal": "품질검사 등록", "visible": ["LOT NO", "품목명", "공정명", "수량", "작업자", "특이사항", "검사 데이터 입력"] } }, { "id": "step-5", "name": "검사 등록 폼 입력", "description": "모달 내 검사 정보 입력", "actions": [ { "type": "fillInModal", "target": "수량", "value": "{testData.inspection.quantity}", "options": { "waitAfter": 100 } }, { "type": "selectInModal", "target": "작업자", "value": "{testData.inspection.worker}", "options": { "waitAfter": 200 } }, { "type": "fillInModal", "target": "특이사항", "value": "{testData.inspection.note}", "options": { "waitAfter": 100 } }, { "type": "clickInModal", "target": "양호", "description": "가공상태 양호 선택", "options": { "waitAfter": 100 } }, { "type": "fillInModal", "target": "높이 측정값", "value": "{testData.inspection.height}", "options": { "waitAfter": 100 } }, { "type": "fillInModal", "target": "길이 측정값", "value": "{testData.inspection.length}", "options": { "waitAfter": 100 } } ] }, { "id": "step-6", "name": "필수 검증 #2: 검사 등록 저장", "description": "모달 내 등록 버튼 클릭하여 검사 저장", "actions": [ { "type": "clickInModal", "target": "등록", "options": { "waitAfter": 500 } } ], "expect": { "urlMaintained": true, "noErrorPage": true, "toast": ["등록", "완료", "성공"], "modalClosed": true }, "verify": { "apiCall": "POST /api/quality/inspection" } }, { "id": "step-7", "name": "필수 검증 #4: 등록 데이터 반영 확인", "critical": true, "note": "토스트 성공 메시지만으로 PASS 판정 불가. 실제 데이터 등록 확인 필수!", "description": "테이블에서 등록된 검사 확인", "verify": { "tableContains": ["대기", "{testData.inspection.worker}"], "recordCountIncreased": true } }, { "id": "step-8", "name": "등록된 검사 상세 열기", "description": "등록된 검사 항목 클릭하여 상세 보기", "actions": [ { "type": "findRow", "contains": "{testData.inspection.worker}", "then": { "type": "click", "target": "row" } } ], "expect": { "modal": "검사 상세", "visible": ["수정", "삭제"] } }, { "id": "step-9", "name": "검사 정보 수정", "description": "모달 내 검사 정보 수정 테스트", "actions": [ { "type": "clickInModal", "target": "수정", "options": { "waitAfter": 300 } }, { "type": "fillInModal", "target": "특이사항", "value": "E2E 테스트 수정됨", "options": { "waitAfter": 100 } }, { "type": "clickInModal", "target": "저장", "options": { "waitAfter": 500 } } ], "expect": { "toast": ["수정", "완료", "성공"], "modalClosed": true } }, { "id": "step-10", "name": "필수 검증 #4: 수정 데이터 반영 확인", "critical": true, "note": "토스트 성공 메시지만으로 PASS 판정 불가. 실제 데이터 변경 확인 필수!", "description": "테이블에서 수정된 검사 확인", "verify": { "dataModified": true } }, { "id": "step-11", "name": "검사 삭제 준비", "description": "삭제할 검사 선택", "actions": [ { "type": "findRow", "contains": "{testData.inspection.worker}", "then": { "type": "click", "target": "row" } } ], "expect": { "modal": "검사 상세", "visible": ["삭제"] } }, { "id": "step-12", "name": "검사 삭제", "description": "삭제 버튼 클릭하여 검사 삭제", "actions": [ { "type": "click", "target": "삭제" } ], "expect": { "confirmDialog": true, "dialogText": ["삭제", "하시겠습니까"] } }, { "id": "step-13", "name": "삭제 확인", "description": "삭제 확인 다이얼로그에서 확인 클릭", "actions": [ { "type": "click", "target": "확인" } ], "expect": { "toast": ["삭제", "완료", "성공"], "modalClosed": true } }, { "id": "step-14", "name": "필수 검증 #4: 삭제 데이터 반영 확인", "critical": true, "note": "토스트 성공 메시지만으로 PASS 판정 불가. 실제 데이터 삭제 확인 필수!", "description": "테이블에서 삭제된 검사가 없는지 확인", "verify": { "tableNotContains": "E2E 테스트", "recordCountDecreased": true } } ], "assertions": [ { "type": "url", "expected": "/quality/inspection", "message": "검사관리 페이지에 머물러야 함" }, { "type": "elementExists", "selector": "button:has-text('검사 등록')", "message": "검사 등록 버튼이 표시되어야 함" } ], "mandatoryVerifications": { "description": "E2E_TEST_CONFIG.md 기준 필수 검증 항목", "items": [ { "id": 2, "name": "등록/저장 버튼", "trigger": "검사 등록 버튼", "verification": "URL 유지 + 에러 페이지 없음 + 성공 토스트 + 데이터 반영", "failCondition": "404/500 에러 페이지 이동" }, { "id": 4, "name": "모달 등록 완료", "trigger": "검사 등록 모달", "verification": "실제 저장 동작 + 결과 확인", "failCondition": "열기/닫기만 테스트" }, { "id": 5, "name": "목업/미완성 페이지 감지", "trigger": "페이지 로드 시", "verification": "입력 필드 + 동작하는 버튼 + API 호출 확인", "failCondition": "버튼만 있고 입력 불가, Console LOG만 출력" } ] }, "cleanup": { "enabled": true, "description": "테스트 중 생성된 검사 데이터 삭제", "actions": [ { "type": "deleteTestData", "condition": "contains:E2E 테스트" } ] }, "notes": { "testScope": "검사 등록 → 조회 → 수정 → 삭제 전체 CRUD 테스트", "modalFields": { "LOT NO": "자동 생성", "품목명": "자동 연동", "공정명": "자동 연동", "수량": "숫자 입력", "작업자": "드롭다운 선택", "특이사항": "텍스트 입력", "가공상태": "양호/불량 선택", "높이": "측정값 입력 (mm)", "길이": "측정값 입력 (mm)" }, "prerequisites": "로그인된 사용자에게 품질검사 등록 권한 필요" } }