refactor: work-performance.json C등급→B등급 개선 (6→14스텝)
- searchWithinParent/closeOtherMenus 플래그 추가 - auth 섹션으로 표준화 - 기간 필터 테스트 (시작일/종료일) 추가 - 공정 필터 확인 추가 - 상세 조회 테스트 추가 - 엑셀 다운로드 API 검증 추가 - expectedAPIs, requiredVerifications, rollbackPlan 추가
This commit is contained in:
@@ -5,168 +5,210 @@
|
|||||||
"onErrorOnly": true,
|
"onErrorOnly": true,
|
||||||
"captureOn": ["error", "fail", "timeout", "404", "500", "blocked"]
|
"captureOn": ["error", "fail", "timeout", "404", "500", "blocked"]
|
||||||
},
|
},
|
||||||
"description": "생산관리 > 작업실적 페이지의 작업실적 조회 및 엑셀 다운로드 기능을 테스트하는 E2E 테스트",
|
"description": "생산관리 > 작업실적 메뉴의 작업실적 조회/필터/검색/엑셀다운로드 기능 테스트",
|
||||||
"baseUrl": "https://dev.codebridge-x.com",
|
"baseUrl": "https://dev.codebridge-x.com",
|
||||||
"url": "/production/performance",
|
|
||||||
"navigation": {
|
|
||||||
"targetUrl": "/production/work-results",
|
|
||||||
"urlPattern": "/production/work-results|/ko/production/work-results|/production/performance",
|
|
||||||
"menuHints": ["작업실적", "작업 실적", "생산관리"]
|
|
||||||
},
|
|
||||||
"menuNavigation": {
|
"menuNavigation": {
|
||||||
"level1": "생산관리",
|
"level1": "생산관리",
|
||||||
"level2": "작업실적",
|
"level2": "작업실적",
|
||||||
"expectedUrl": "/production/performance"
|
"expectedUrl": "/production/performance",
|
||||||
|
"searchWithinParent": true,
|
||||||
|
"closeOtherMenus": true
|
||||||
},
|
},
|
||||||
"menuNavigationEnhanced": {
|
"auth": {
|
||||||
"strategy": "scroll-and-search",
|
"username": "TestUser5",
|
||||||
"sidebar": {
|
"password": "password123!"
|
||||||
"scrollContainer": ".sidebar-scroll",
|
|
||||||
"scrollStep": 200,
|
|
||||||
"maxScrollAttempts": 5,
|
|
||||||
"waitAfterScroll": 300
|
|
||||||
},
|
|
||||||
"level1": {
|
|
||||||
"text": "생산관리",
|
|
||||||
"expandable": true,
|
|
||||||
"waitAfterClick": 500
|
|
||||||
},
|
|
||||||
"level2": {
|
|
||||||
"text": "작업실적",
|
|
||||||
"waitAfterClick": 300
|
|
||||||
},
|
|
||||||
"fallbackUrl": "/production/performance",
|
|
||||||
"expectedUrl": "/production/performance"
|
|
||||||
},
|
},
|
||||||
"timeout": 90000,
|
|
||||||
"tags": ["production", "performance", "read-only"],
|
|
||||||
|
|
||||||
"login": {
|
|
||||||
"url": "https://dev.codebridge-x.com/login",
|
|
||||||
"credentials": {
|
|
||||||
"id": "TestUser5",
|
|
||||||
"password": "password123!"
|
|
||||||
},
|
|
||||||
"successIndicator": "대시보드"
|
|
||||||
},
|
|
||||||
|
|
||||||
"steps": [
|
"steps": [
|
||||||
{
|
{
|
||||||
"id": "step-0",
|
"id": 1,
|
||||||
"name": "사이드바 메뉴 전체 펼치기",
|
"name": "메뉴 진입: 생산관리 > 작업실적",
|
||||||
"description": "모두 펼치기 버튼을 클릭하여 전체 메뉴를 펼친 후 메뉴 탐색 준비",
|
"action": "menu_navigate",
|
||||||
"actions": [
|
"level1": "생산관리",
|
||||||
{
|
"level2": "작업실적",
|
||||||
"type": "evaluate",
|
"expected": {
|
||||||
"script": "document.querySelector('.sidebar-scroll')?.scrollTo({top:0,behavior:'instant'})"
|
"url_contains": "/production/performance",
|
||||||
},
|
"visible": ["작업실적", "조회"]
|
||||||
{ "type": "wait", "duration": 300 },
|
}
|
||||||
{
|
|
||||||
"type": "evaluate",
|
|
||||||
"script": "Array.from(document.querySelectorAll('button')).find(b => b.innerText?.includes('모두 펼치기'))?.click()"
|
|
||||||
},
|
|
||||||
{ "type": "wait", "duration": 2000 }
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "step-1",
|
"id": 2,
|
||||||
"name": "생산관리 메뉴 진입",
|
"name": "필수 검증 #5: 목업 페이지 감지",
|
||||||
"description": "생산관리 > 작업실적 메뉴로 이동",
|
"action": "verify_not_mockup",
|
||||||
"actions": [
|
"checks": [
|
||||||
{
|
"작업실적 테이블 표시",
|
||||||
"type": "scrollAndFind",
|
"검색/필터 영역 존재",
|
||||||
"container": ".sidebar-scroll",
|
"엑셀 다운로드 버튼 존재"
|
||||||
"target": "생산관리",
|
|
||||||
"scrollStep": 200,
|
|
||||||
"maxAttempts": 5
|
|
||||||
},
|
|
||||||
{ "type": "click", "target": "생산관리" },
|
|
||||||
{ "type": "wait", "duration": 500 },
|
|
||||||
{ "type": "click", "target": "작업실적" }
|
|
||||||
],
|
],
|
||||||
"expect": {
|
"expected": "정상 페이지 (목업 아님)"
|
||||||
"url": "/production/performance",
|
|
||||||
"visible": ["작업실적 조회", "엑셀 다운로드"]
|
|
||||||
},
|
|
||||||
"fallback": {
|
|
||||||
"type": "navigate",
|
|
||||||
"url": "/production/performance"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "step-2",
|
"id": 3,
|
||||||
"name": "페이지 구조 확인",
|
"name": "통계 카드 확인",
|
||||||
"description": "통계 카드와 테이블 구조 확인",
|
"action": "verify_elements",
|
||||||
"verify": {
|
"checks": [
|
||||||
"visible": ["총 생산수량", "양품수량", "불량수량", "불량률"],
|
"총 생산수량 카드",
|
||||||
"tableColumns": ["번호", "로트번호", "작업일", "작업지시번호", "공정", "품목명", "규격", "생산수량", "양품수량", "불량수량", "불량률", "검사", "포장", "작업자"]
|
"양품수량 카드",
|
||||||
}
|
"불량수량 카드",
|
||||||
},
|
"불량률 카드"
|
||||||
{
|
|
||||||
"id": "step-3",
|
|
||||||
"name": "필수 검증 #1: 엑셀 다운로드 버튼 확인",
|
|
||||||
"description": "엑셀 다운로드 버튼 존재 및 동작 확인",
|
|
||||||
"actions": [
|
|
||||||
{ "type": "click", "target": "엑셀 다운로드" },
|
|
||||||
{ "type": "wait", "duration": 1000 }
|
|
||||||
],
|
],
|
||||||
"expect": {
|
"expected": "통계 카드 표시"
|
||||||
"downloadTriggered": true,
|
},
|
||||||
"noErrorPage": true
|
{
|
||||||
|
"id": 4,
|
||||||
|
"name": "작업실적 테이블 구조 확인",
|
||||||
|
"action": "verify_table",
|
||||||
|
"checks": [
|
||||||
|
"로트번호 컬럼",
|
||||||
|
"작업일 컬럼",
|
||||||
|
"작업지시번호 컬럼",
|
||||||
|
"공정 컬럼",
|
||||||
|
"품목명 컬럼",
|
||||||
|
"생산수량 컬럼",
|
||||||
|
"양품수량 컬럼",
|
||||||
|
"불량수량 컬럼"
|
||||||
|
],
|
||||||
|
"expected": "작업실적 테이블 표시"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"phase": "FILTER",
|
||||||
|
"name": "[FILTER] 기간 필터 - 시작일",
|
||||||
|
"action": "click",
|
||||||
|
"target": "input[type='date']:first-of-type, input[name*='start'], input[placeholder*='시작']",
|
||||||
|
"expected": "시작일 선택 열림"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"phase": "FILTER",
|
||||||
|
"name": "[FILTER] 기간 필터 - 종료일",
|
||||||
|
"action": "click",
|
||||||
|
"target": "input[type='date']:last-of-type, input[name*='end'], input[placeholder*='종료']",
|
||||||
|
"expected": "종료일 선택 열림"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"phase": "FILTER",
|
||||||
|
"name": "[FILTER] 조회 버튼 클릭",
|
||||||
|
"action": "click",
|
||||||
|
"target": "button:has-text('조회'), button:has-text('검색'), button:has-text('적용')",
|
||||||
|
"expected": "필터 적용됨"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"phase": "FILTER",
|
||||||
|
"name": "[FILTER] 필터 결과 확인",
|
||||||
|
"action": "verify_detail",
|
||||||
|
"checks": [
|
||||||
|
"선택한 기간의 작업실적 데이터 표시 또는 검색 결과 없음"
|
||||||
|
],
|
||||||
|
"expected": "필터 동작 확인"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 9,
|
||||||
|
"name": "공정 필터 확인",
|
||||||
|
"action": "verify_elements",
|
||||||
|
"checks": [
|
||||||
|
"공정 선택 드롭다운 또는 필터"
|
||||||
|
],
|
||||||
|
"expected": "공정 필터 존재"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 10,
|
||||||
|
"phase": "READ",
|
||||||
|
"name": "[READ] 작업실적 행 상세 조회",
|
||||||
|
"action": "click",
|
||||||
|
"target": "table tbody tr:first-child",
|
||||||
|
"expected": {
|
||||||
|
"detail_view": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 11,
|
||||||
|
"name": "상세 정보 확인",
|
||||||
|
"action": "verify_detail",
|
||||||
|
"checks": [
|
||||||
|
"로트번호 표시",
|
||||||
|
"작업일 표시",
|
||||||
|
"생산수량 표시",
|
||||||
|
"양품수량 표시",
|
||||||
|
"불량수량 표시"
|
||||||
|
],
|
||||||
|
"expected": "상세 정보 표시"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 12,
|
||||||
|
"name": "필수 검증 #1: 엑셀 다운로드",
|
||||||
|
"action": "click",
|
||||||
|
"target": "button:has-text('엑셀'), button:has-text('Excel'), button:has-text('다운로드')",
|
||||||
|
"critical": true,
|
||||||
|
"verify": {
|
||||||
|
"api_call": "GET /api/v1/production/performance/export",
|
||||||
|
"download_triggered": true
|
||||||
},
|
},
|
||||||
"verify": {
|
"expected": "엑셀 파일 다운로드"
|
||||||
"apiCall": "GET /api/production/performance/export"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "step-4",
|
"id": 13,
|
||||||
"name": "빈 상태 확인",
|
"name": "페이지네이션 확인",
|
||||||
"description": "데이터가 없을 때 빈 상태 메시지 확인",
|
"action": "verify_elements",
|
||||||
"verify": {
|
"checks": [
|
||||||
"emptyStateVisible": "검색 결과가 없습니다"
|
"페이지 번호 또는 더보기 버튼"
|
||||||
}
|
],
|
||||||
|
"expected": "페이지네이션 표시"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": "step-5",
|
"id": 14,
|
||||||
"name": "테이블 헤더 정렬 확인",
|
"name": "인쇄 버튼 확인",
|
||||||
"description": "테이블 컬럼 헤더가 올바르게 표시되는지 확인",
|
"action": "verify_elements",
|
||||||
"verify": {
|
"checks": [
|
||||||
"tableHeadersVisible": ["로트번호", "작업일", "작업지시번호", "공정", "품목명"]
|
"인쇄 버튼 존재"
|
||||||
}
|
],
|
||||||
|
"expected": "인쇄 기능 표시"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"expectedAPIs": [
|
||||||
"assertions": [
|
|
||||||
{
|
{
|
||||||
"type": "url",
|
"method": "GET",
|
||||||
"expected": "/production/performance",
|
"endpoint": "/api/v1/production/performance",
|
||||||
"message": "작업실적 페이지에 머물러야 함"
|
"description": "작업실적 목록 조회"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "elementExists",
|
"method": "GET",
|
||||||
"selector": "button:has-text('엑셀 다운로드')",
|
"endpoint": "/api/v1/production/performance/:id",
|
||||||
"message": "엑셀 다운로드 버튼이 표시되어야 함"
|
"description": "작업실적 상세 조회"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "GET",
|
||||||
|
"endpoint": "/api/v1/production/performance/export",
|
||||||
|
"description": "작업실적 엑셀 다운로드"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "GET",
|
||||||
|
"endpoint": "/api/v1/production/performance/stats",
|
||||||
|
"description": "작업실적 통계 조회"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"requiredVerifications": [
|
||||||
"mandatoryVerifications": {
|
{
|
||||||
"description": "E2E_TEST_CONFIG.md 기준 필수 검증 항목",
|
"id": 1,
|
||||||
"items": [
|
"name": "파일 다운로드",
|
||||||
{
|
"steps": [12],
|
||||||
"id": 1,
|
"criteria": "Network API 호출 + 실제 다운로드 확인"
|
||||||
"name": "파일 다운로드",
|
},
|
||||||
"trigger": "엑셀 다운로드 버튼",
|
{
|
||||||
"verification": "Network API + 실제 다운로드 확인",
|
"id": 3,
|
||||||
"failCondition": "Console LOG만으로 PASS 금지"
|
"name": "검색/필터",
|
||||||
}
|
"steps": [5, 6, 7, 8],
|
||||||
]
|
"criteria": "기간 필터 동작"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
"notes": {
|
"id": 5,
|
||||||
"testScope": "작업실적 조회 및 엑셀 다운로드 테스트",
|
"name": "목업 페이지 감지",
|
||||||
"pageType": "조회 전용 (생산 과정에서 자동 생성된 데이터)",
|
"steps": [2],
|
||||||
"statsCards": ["총 생산수량", "양품수량", "불량수량", "불량률"],
|
"criteria": "테이블, 필터, 다운로드 버튼 존재"
|
||||||
"tableColumns": ["번호", "로트번호", "작업일", "작업지시번호", "공정", "품목명", "규격", "생산수량", "양품수량", "불량수량", "불량률", "검사", "포장", "작업자"],
|
}
|
||||||
"prerequisites": "로그인된 사용자, 작업실적 데이터 존재 시 테스트 가능"
|
],
|
||||||
|
"rollbackPlan": {
|
||||||
|
"note": "조회 전용 페이지로 데이터 변경 없음"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user