From 4e34b746a7e480c627cc6b3c9012f35455e7b7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Tue, 3 Feb 2026 14:07:16 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20work-performance.json=20C=EB=93=B1?= =?UTF-8?q?=EA=B8=89=E2=86=92B=EB=93=B1=EA=B8=89=20=EA=B0=9C=EC=84=A0=20(6?= =?UTF-8?q?=E2=86=9214=EC=8A=A4=ED=85=9D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - searchWithinParent/closeOtherMenus 플래그 추가 - auth 섹션으로 표준화 - 기간 필터 테스트 (시작일/종료일) 추가 - 공정 필터 확인 추가 - 상세 조회 테스트 추가 - 엑셀 다운로드 API 검증 추가 - expectedAPIs, requiredVerifications, rollbackPlan 추가 --- work-performance.json | 316 ++++++++++++++++++++++++------------------ 1 file changed, 179 insertions(+), 137 deletions(-) diff --git a/work-performance.json b/work-performance.json index 5bd7c72..481d865 100644 --- a/work-performance.json +++ b/work-performance.json @@ -5,168 +5,210 @@ "onErrorOnly": true, "captureOn": ["error", "fail", "timeout", "404", "500", "blocked"] }, - "description": "생산관리 > 작업실적 페이지의 작업실적 조회 및 엑셀 다운로드 기능을 테스트하는 E2E 테스트", + "description": "생산관리 > 작업실적 메뉴의 작업실적 조회/필터/검색/엑셀다운로드 기능 테스트", "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": { "level1": "생산관리", "level2": "작업실적", - "expectedUrl": "/production/performance" + "expectedUrl": "/production/performance", + "searchWithinParent": true, + "closeOtherMenus": true }, - "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": "/production/performance", - "expectedUrl": "/production/performance" + "auth": { + "username": "TestUser5", + "password": "password123!" }, - "timeout": 90000, - "tags": ["production", "performance", "read-only"], - - "login": { - "url": "https://dev.codebridge-x.com/login", - "credentials": { - "id": "TestUser5", - "password": "password123!" - }, - "successIndicator": "대시보드" - }, - "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 } - ] + "id": 1, + "name": "메뉴 진입: 생산관리 > 작업실적", + "action": "menu_navigate", + "level1": "생산관리", + "level2": "작업실적", + "expected": { + "url_contains": "/production/performance", + "visible": ["작업실적", "조회"] + } }, { - "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": "작업실적" } + "id": 2, + "name": "필수 검증 #5: 목업 페이지 감지", + "action": "verify_not_mockup", + "checks": [ + "작업실적 테이블 표시", + "검색/필터 영역 존재", + "엑셀 다운로드 버튼 존재" ], - "expect": { - "url": "/production/performance", - "visible": ["작업실적 조회", "엑셀 다운로드"] - }, - "fallback": { - "type": "navigate", - "url": "/production/performance" - } + "expected": "정상 페이지 (목업 아님)" }, { - "id": "step-2", - "name": "페이지 구조 확인", - "description": "통계 카드와 테이블 구조 확인", - "verify": { - "visible": ["총 생산수량", "양품수량", "불량수량", "불량률"], - "tableColumns": ["번호", "로트번호", "작업일", "작업지시번호", "공정", "품목명", "규격", "생산수량", "양품수량", "불량수량", "불량률", "검사", "포장", "작업자"] - } - }, - { - "id": "step-3", - "name": "필수 검증 #1: 엑셀 다운로드 버튼 확인", - "description": "엑셀 다운로드 버튼 존재 및 동작 확인", - "actions": [ - { "type": "click", "target": "엑셀 다운로드" }, - { "type": "wait", "duration": 1000 } + "id": 3, + "name": "통계 카드 확인", + "action": "verify_elements", + "checks": [ + "총 생산수량 카드", + "양품수량 카드", + "불량수량 카드", + "불량률 카드" ], - "expect": { - "downloadTriggered": true, - "noErrorPage": true + "expected": "통계 카드 표시" + }, + { + "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": { - "apiCall": "GET /api/production/performance/export" - } + "expected": "엑셀 파일 다운로드" }, { - "id": "step-4", - "name": "빈 상태 확인", - "description": "데이터가 없을 때 빈 상태 메시지 확인", - "verify": { - "emptyStateVisible": "검색 결과가 없습니다" - } + "id": 13, + "name": "페이지네이션 확인", + "action": "verify_elements", + "checks": [ + "페이지 번호 또는 더보기 버튼" + ], + "expected": "페이지네이션 표시" }, { - "id": "step-5", - "name": "테이블 헤더 정렬 확인", - "description": "테이블 컬럼 헤더가 올바르게 표시되는지 확인", - "verify": { - "tableHeadersVisible": ["로트번호", "작업일", "작업지시번호", "공정", "품목명"] - } + "id": 14, + "name": "인쇄 버튼 확인", + "action": "verify_elements", + "checks": [ + "인쇄 버튼 존재" + ], + "expected": "인쇄 기능 표시" } ], - - "assertions": [ + "expectedAPIs": [ { - "type": "url", - "expected": "/production/performance", - "message": "작업실적 페이지에 머물러야 함" + "method": "GET", + "endpoint": "/api/v1/production/performance", + "description": "작업실적 목록 조회" }, { - "type": "elementExists", - "selector": "button:has-text('엑셀 다운로드')", - "message": "엑셀 다운로드 버튼이 표시되어야 함" + "method": "GET", + "endpoint": "/api/v1/production/performance/:id", + "description": "작업실적 상세 조회" + }, + { + "method": "GET", + "endpoint": "/api/v1/production/performance/export", + "description": "작업실적 엑셀 다운로드" + }, + { + "method": "GET", + "endpoint": "/api/v1/production/performance/stats", + "description": "작업실적 통계 조회" } ], - - "mandatoryVerifications": { - "description": "E2E_TEST_CONFIG.md 기준 필수 검증 항목", - "items": [ - { - "id": 1, - "name": "파일 다운로드", - "trigger": "엑셀 다운로드 버튼", - "verification": "Network API + 실제 다운로드 확인", - "failCondition": "Console LOG만으로 PASS 금지" - } - ] - }, - - "notes": { - "testScope": "작업실적 조회 및 엑셀 다운로드 테스트", - "pageType": "조회 전용 (생산 과정에서 자동 생성된 데이터)", - "statsCards": ["총 생산수량", "양품수량", "불량수량", "불량률"], - "tableColumns": ["번호", "로트번호", "작업일", "작업지시번호", "공정", "품목명", "규격", "생산수량", "양품수량", "불량수량", "불량률", "검사", "포장", "작업자"], - "prerequisites": "로그인된 사용자, 작업실적 데이터 존재 시 테스트 가능" + "requiredVerifications": [ + { + "id": 1, + "name": "파일 다운로드", + "steps": [12], + "criteria": "Network API 호출 + 실제 다운로드 확인" + }, + { + "id": 3, + "name": "검색/필터", + "steps": [5, 6, 7, 8], + "criteria": "기간 필터 동작" + }, + { + "id": 5, + "name": "목업 페이지 감지", + "steps": [2], + "criteria": "테이블, 필터, 다운로드 버튼 존재" + } + ], + "rollbackPlan": { + "note": "조회 전용 페이지로 데이터 변경 없음" } }