310 lines
8.3 KiB
JSON
310 lines
8.3 KiB
JSON
{
|
|
"enabled": true,
|
|
"id": "production-work-result",
|
|
"name": "작업실적 테스트",
|
|
"screenshotPolicy": {
|
|
"onErrorOnly": true,
|
|
"captureOn": [
|
|
"error",
|
|
"fail",
|
|
"timeout",
|
|
"404",
|
|
"500",
|
|
"blocked"
|
|
]
|
|
},
|
|
"description": "생산관리 > 작업실적 메뉴의 작업 실적 CRUD 기능 테스트",
|
|
"baseUrl": "https://dev.codebridge-x.com",
|
|
"menuNavigation": {
|
|
"level1": "생산관리",
|
|
"level2": "작업실적",
|
|
"expectedUrl": "/production/work-results",
|
|
"searchWithinParent": true,
|
|
"closeOtherMenus": true
|
|
},
|
|
"auth": {
|
|
"username": "TestUser5",
|
|
"password": "password123!"
|
|
},
|
|
"testData": {
|
|
"create": {
|
|
"description": "E2E_TEST_실적_{timestamp}",
|
|
"quantity": "100",
|
|
"defectQty": "5"
|
|
}
|
|
},
|
|
"steps": [
|
|
{
|
|
"id": 1,
|
|
"name": "메뉴 진입: 생산관리 > 작업실적",
|
|
"action": "menu_navigate",
|
|
"level1": "생산관리",
|
|
"level2": "작업실적",
|
|
"expected": {
|
|
"url_contains": "/production/work",
|
|
"visible": [
|
|
"작업실적"
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"id": 2,
|
|
"name": "URL 검증",
|
|
"action": "verify_url",
|
|
"expected": {
|
|
"url_contains": "/production/work-results"
|
|
}
|
|
},
|
|
{
|
|
"id": 3,
|
|
"name": "필수 검증 #5: 목업 페이지 감지",
|
|
"action": "verify_not_mockup",
|
|
"checks": [
|
|
"작업실적 목록 표시",
|
|
"실적 등록 버튼 존재",
|
|
"기간 필터 존재"
|
|
],
|
|
"expected": "정상 페이지 (목업 아님)"
|
|
},
|
|
{
|
|
"id": 4,
|
|
"name": "통계 카드 확인",
|
|
"action": "evaluate",
|
|
"script": "(() => {\n const cards = document.querySelectorAll('[class*=\"card\"], [class*=\"Card\"], [class*=\"stat\"], [class*=\"Stat\"], [class*=\"summary\"]');\n const texts = Array.from(cards).map(c => c.innerText?.substring(0, 30)).filter(Boolean);\n return texts.length > 0 ? 'Stats: ' + texts.length + ' cards found' : 'No stat cards (ok)';\n })()"
|
|
},
|
|
{
|
|
"id": 5,
|
|
"name": "작업실적 테이블 구조 확인",
|
|
"action": "verify_table",
|
|
"checks": [
|
|
"작업일 컬럼",
|
|
"품목 컬럼",
|
|
"지시 수량 컬럼",
|
|
"실적 수량 컬럼",
|
|
"작업자 컬럼"
|
|
],
|
|
"expected": "작업실적 테이블 표시"
|
|
},
|
|
{
|
|
"id": 6,
|
|
"phase": "FILTER",
|
|
"name": "[FILTER] 기간 필터 - 시작일",
|
|
"action": "click_if_exists",
|
|
"target": "input[type='date']:first-of-type, input[name*='start']",
|
|
"value": "2025-01-01"
|
|
},
|
|
{
|
|
"id": 7,
|
|
"phase": "FILTER",
|
|
"name": "[FILTER] 기간 필터 - 종료일",
|
|
"action": "click_if_exists",
|
|
"target": "input[type='date']:last-of-type, input[name*='end']",
|
|
"value": "2025-12-31"
|
|
},
|
|
{
|
|
"id": 8,
|
|
"phase": "FILTER",
|
|
"name": "[FILTER] 조회 실행",
|
|
"action": "click_if_exists",
|
|
"target": "button:has-text('조회'), button:has-text('검색')",
|
|
"expected": {
|
|
"api_call": "GET /api/v1/production/work-results"
|
|
}
|
|
},
|
|
{
|
|
"id": 9,
|
|
"phase": "CREATE",
|
|
"name": "[CREATE] 실적 등록 버튼 클릭",
|
|
"action": "click_if_exists",
|
|
"target": "button:has-text('등록'), button:has-text('추가'), button:has-text('신규')",
|
|
"expected": {
|
|
"modal_open": true
|
|
}
|
|
},
|
|
{
|
|
"id": 10,
|
|
"phase": "CREATE",
|
|
"name": "[CREATE] 작업 지시 선택",
|
|
"action": "click_if_exists",
|
|
"target": "select[name*='order'], button:has-text('작업지시'), input[placeholder*='작업지시']",
|
|
"expected": "작업 지시 선택 가능"
|
|
},
|
|
{
|
|
"id": 11,
|
|
"phase": "CREATE",
|
|
"name": "[CREATE] 생산 수량 입력",
|
|
"action": "click_if_exists",
|
|
"target": "input[name*='quantity'], input[name*='qty'], input[placeholder*='수량']",
|
|
"value": "100",
|
|
"clear": true
|
|
},
|
|
{
|
|
"id": 12,
|
|
"phase": "CREATE",
|
|
"name": "[CREATE] 불량 수량 입력",
|
|
"action": "click_if_exists",
|
|
"target": "input[name*='defect'], input[placeholder*='불량']",
|
|
"value": "5",
|
|
"clear": true
|
|
},
|
|
{
|
|
"id": 13,
|
|
"phase": "CREATE",
|
|
"name": "[CREATE] 필수 검증 #2: 실적 저장",
|
|
"action": "click_if_exists",
|
|
"target": "button:has-text('저장'), button:has-text('등록'), button:has-text('확인')",
|
|
"verify": {
|
|
"url_maintained": true,
|
|
"no_error_page": true,
|
|
"api_call": "POST /api/v1/production/work-results",
|
|
"toast": "등록|저장|완료|성공"
|
|
},
|
|
"expected": "실적 등록 완료"
|
|
},
|
|
{
|
|
"id": 14,
|
|
"phase": "CREATE",
|
|
"name": "[CREATE] 저장 완료 토스트 확인",
|
|
"action": "verify_toast",
|
|
"verify": {
|
|
"contains": "등록|완료|성공|저장"
|
|
}
|
|
},
|
|
{
|
|
"id": 15,
|
|
"phase": "READ",
|
|
"name": "[READ] 등록된 실적 확인",
|
|
"action": "verify_detail",
|
|
"checks": [
|
|
"등록한 실적 목록에 표시"
|
|
],
|
|
"expected": "등록된 실적 확인"
|
|
},
|
|
{
|
|
"id": 16,
|
|
"phase": "READ",
|
|
"name": "[READ] 실적 상세 조회",
|
|
"action": "click_if_exists",
|
|
"target": "table tbody tr:first-child",
|
|
"expected": {
|
|
"detail_view": true
|
|
}
|
|
},
|
|
{
|
|
"id": 17,
|
|
"name": "실적 상세 정보 확인",
|
|
"action": "verify_detail",
|
|
"checks": [
|
|
"작업일시",
|
|
"품목 정보",
|
|
"생산 수량",
|
|
"불량 수량",
|
|
"작업자 정보"
|
|
],
|
|
"expected": "실적 상세 정보 표시"
|
|
},
|
|
{
|
|
"id": 18,
|
|
"phase": "UPDATE",
|
|
"name": "[UPDATE] 실적 수정",
|
|
"action": "click_if_exists",
|
|
"target": "button:has-text('수정'), button:has-text('편집')",
|
|
"expected": {
|
|
"edit_mode": true
|
|
}
|
|
},
|
|
{
|
|
"id": 19,
|
|
"phase": "UPDATE",
|
|
"name": "[UPDATE] 수량 수정",
|
|
"action": "click_if_exists",
|
|
"target": "input[name*='quantity'], input[name*='qty']",
|
|
"value": "95",
|
|
"clear": true
|
|
},
|
|
{
|
|
"id": 20,
|
|
"phase": "UPDATE",
|
|
"name": "[UPDATE] 수정 저장",
|
|
"action": "click_if_exists",
|
|
"target": "button:has-text('저장'), button:has-text('확인')",
|
|
"verify": {
|
|
"api_call": "PUT /api/v1/production/work-results",
|
|
"toast": "수정|저장|완료|성공"
|
|
},
|
|
"expected": "실적 수정 완료"
|
|
},
|
|
{
|
|
"id": 21,
|
|
"phase": "UPDATE",
|
|
"name": "[UPDATE] 수정 완료 토스트 확인",
|
|
"action": "verify_toast",
|
|
"verify": {
|
|
"contains": "수정|완료|성공|저장"
|
|
}
|
|
},
|
|
{
|
|
"id": 22,
|
|
"name": "엑셀 다운로드 확인",
|
|
"action": "click_if_exists",
|
|
"target": "button:has-text('엑셀'), button:has-text('Excel'), button:has-text('다운로드')",
|
|
"verify": {
|
|
"file_download": true
|
|
},
|
|
"expected": "엑셀 파일 다운로드"
|
|
},
|
|
{
|
|
"id": 23,
|
|
"name": "콘솔 에러 확인",
|
|
"action": "verify_element",
|
|
"target": "body"
|
|
}
|
|
],
|
|
"expectedAPIs": [
|
|
{
|
|
"method": "GET",
|
|
"endpoint": "/api/v1/production/work-results",
|
|
"description": "작업실적 목록 조회"
|
|
},
|
|
{
|
|
"method": "POST",
|
|
"endpoint": "/api/v1/production/work-results",
|
|
"description": "작업실적 등록"
|
|
},
|
|
{
|
|
"method": "PUT",
|
|
"endpoint": "/api/v1/production/work-results/:id",
|
|
"description": "작업실적 수정"
|
|
},
|
|
{
|
|
"method": "GET",
|
|
"endpoint": "/api/v1/production/work-results/export",
|
|
"description": "작업실적 엑셀 다운로드"
|
|
}
|
|
],
|
|
"requiredVerifications": [
|
|
{
|
|
"id": 2,
|
|
"name": "저장 버튼",
|
|
"steps": [
|
|
11,
|
|
17
|
|
],
|
|
"criteria": "API 호출 + 성공 토스트 + 데이터 반영"
|
|
},
|
|
{
|
|
"id": 5,
|
|
"name": "목업 페이지 감지",
|
|
"steps": [
|
|
2
|
|
],
|
|
"criteria": "작업실적 목록, 등록 버튼, 기간 필터 존재"
|
|
}
|
|
],
|
|
"rollbackPlan": {
|
|
"onCreateFail": "등록 모달 닫고 재시도",
|
|
"onUpdateFail": "페이지 새로고침 후 재시도",
|
|
"note": "작업실적은 작업지시와 연관되어 있어 주의 필요"
|
|
}
|
|
}
|