Files
sam-scenarios/price-management.json
light cff20a6c0e refactor: navigation 속성 추가 (targetUrl, urlPattern, menuHints)
- 54개 시나리오 파일에 URL 기반 메뉴 탐색을 위한 navigation 속성 추가
- targetUrl: 정확한 페이지 URL 경로
- urlPattern: ko 버전 포함 URL 패턴 (regex)
- menuHints: 메뉴명 힌트 배열 (fallback용)

메뉴 탐색 실패율 41.8% → URL 기반 방식으로 개선 예정

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 21:47:29 +09:00

334 lines
10 KiB
JSON

{
"id": "price-management",
"name": "단가관리 테스트",
"screenshotPolicy": {
"onErrorOnly": true,
"captureOn": ["error", "fail", "timeout", "404", "500", "blocked"]
},
"description": "판매관리 > 단가관리 페이지의 품목별 단가 조회/등록/수정 기능을 테스트하는 E2E 테스트",
"baseUrl": "https://dev.codebridge-x.com",
"url": "/sales/price",
"navigation": {
"targetUrl": "/sales/price",
"urlPattern": "/sales/price|/ko/sales/price",
"menuHints": ["단가관리", "단가 관리", "판매관리"]
},
"menuNavigation": {
"level1": "판매관리",
"level2": "단가관리",
"expectedUrl": "/sales/price"
},
"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": "/sales/price",
"expectedUrl": "/sales/price"
},
"timeout": 90000,
"tags": ["sales", "price", "crud"],
"login": {
"url": "https://dev.codebridge-x.com/login",
"credentials": {
"id": "TestUser5",
"password": "password123!"
},
"successIndicator": "대시보드"
},
"testData": {
"price": {
"purchasePrice": "10000",
"processingCost": "2000",
"sellingPrice": "15000",
"marginRate": "50"
}
},
"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": "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": "/sales/price",
"visible": ["단가 목록", "품목 마스터 동기화"]
},
"fallback": {
"type": "navigate",
"url": "/sales/price"
}
},
{
"id": "step-2",
"name": "페이지 구조 확인",
"description": "통계 카드와 테이블 구조 확인",
"verify": {
"visible": ["전체 품목", "단가 등록", "미등록", "확정"],
"tableColumns": ["번호", "품목유형", "품목코드", "품목명", "규격", "단위", "매입단가", "가공비", "판매단가", "마진율", "적용일", "상태"]
}
},
{
"id": "step-3",
"name": "필수 검증 #3: 품목유형 탭 필터 - 제품",
"description": "제품 탭 클릭하여 필터링 확인",
"actions": [
{ "type": "click", "target": "제품", "role": "tab" },
{ "type": "wait", "duration": 300 }
],
"expect": {
"tabActive": "제품",
"dataFiltered": true
}
},
{
"id": "step-4",
"name": "필수 검증 #3: 품목유형 탭 필터 - 소모품",
"description": "소모품 탭 클릭하여 필터링 확인",
"actions": [
{ "type": "click", "target": "소모품", "role": "tab" },
{ "type": "wait", "duration": 300 }
],
"expect": {
"tabActive": "소모품",
"dataFiltered": true
}
},
{
"id": "step-5",
"name": "전체 탭으로 복귀",
"description": "전체 탭 클릭하여 모든 품목 표시",
"actions": [
{ "type": "click", "target": "전체", "role": "tab" },
{ "type": "wait", "duration": 300 }
],
"expect": {
"tabActive": "전체",
"allDataShown": true
}
},
{
"id": "step-6",
"name": "미등록 품목 선택",
"description": "단가가 미등록된 품목 클릭",
"actions": [
{
"type": "findRow",
"contains": "미등록",
"then": {
"type": "click",
"target": "row"
}
}
],
"expect": {
"pageOrModal": "단가 등록",
"visible": ["매입단가", "가공비", "판매단가", "마진율"]
}
},
{
"id": "step-7",
"name": "필수 검증 #2: 단가 등록 폼 입력",
"description": "단가 정보 입력",
"actions": [
{ "type": "fill", "target": "매입단가", "value": "{testData.price.purchasePrice}" },
{ "type": "fill", "target": "가공비", "value": "{testData.price.processingCost}" },
{ "type": "fill", "target": "판매단가", "value": "{testData.price.sellingPrice}" }
]
},
{
"id": "step-8",
"name": "필수 검증 #2: 단가 등록 저장",
"description": "저장 버튼 클릭하여 단가 저장",
"actions": [
{ "type": "click", "target": "저장" }
],
"expect": {
"urlMaintained": true,
"noErrorPage": true,
"toast": ["등록", "저장", "완료", "성공"]
},
"verify": {
"apiCall": "POST /api/sales/price"
}
},
{
"id": "step-9",
"name": "필수 검증 #4: 등록 데이터 반영 확인",
"critical": true,
"note": "토스트 성공 메시지만으로 PASS 판정 불가. 실제 데이터 등록 확인 필수!",
"description": "테이블에서 등록된 단가 확인",
"verify": {
"tableContains": ["{testData.price.sellingPrice}"],
"statusChanged": "초안"
}
},
{
"id": "step-10",
"name": "등록된 단가 품목 선택",
"description": "단가가 등록된 품목 클릭하여 수정",
"actions": [
{
"type": "findRow",
"contains": "초안",
"then": {
"type": "click",
"target": "row"
}
}
],
"expect": {
"pageOrModal": "단가 상세",
"visible": ["수정", "확정"]
}
},
{
"id": "step-11",
"name": "단가 정보 수정",
"description": "단가 정보 수정 테스트",
"actions": [
{ "type": "click", "target": "수정" },
{ "type": "wait", "duration": 300 },
{ "type": "clear", "target": "판매단가" },
{ "type": "fill", "target": "판매단가", "value": "20000" },
{ "type": "click", "target": "저장" }
],
"expect": {
"toast": ["수정", "저장", "완료", "성공"],
"noErrorPage": true
}
},
{
"id": "step-12",
"name": "필수 검증 #4: 수정 데이터 반영 확인",
"critical": true,
"note": "토스트 성공 메시지만으로 PASS 판정 불가. 실제 데이터 변경 확인 필수!",
"description": "테이블에서 수정된 단가 확인",
"verify": {
"tableContains": "20,000원"
}
},
{
"id": "step-13",
"name": "품목 마스터 동기화 버튼 테스트",
"description": "품목 마스터 동기화 버튼 동작 확인",
"actions": [
{ "type": "click", "target": "품목 마스터 동기화" },
{ "type": "wait", "duration": 1000 }
],
"expect": {
"toast": ["동기화", "완료", "성공"],
"noErrorPage": true
}
},
{
"id": "step-14",
"name": "페이지네이션 확인",
"description": "페이지네이션 동작 확인",
"actions": [
{ "type": "click", "target": "다음" },
{ "type": "wait", "duration": 300 }
],
"expect": {
"pageChanged": true
}
}
],
"assertions": [
{
"type": "url",
"expected": "/sales/price",
"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": 3,
"name": "검색/필터",
"trigger": "품목유형 탭 필터",
"verification": "데이터 변화 확인",
"failCondition": "필터 적용 후 데이터 무변화"
},
{
"id": 4,
"name": "데이터 반영 확인",
"trigger": "단가 등록/수정 완료 후",
"verification": "실제 데이터 등록/수정 확인",
"failCondition": "토스트만 확인하고 데이터 미확인"
}
]
},
"notes": {
"testScope": "단가 조회 → 등록 → 수정 테스트",
"pageFeatures": {
"statsCards": ["전체 품목", "단가 등록", "미등록", "확정"],
"typeTabs": ["전체", "제품", "부품", "부자재", "원자재", "소모품"],
"viewModes": ["카드 뷰", "테이블 뷰"],
"syncButton": "품목 마스터 동기화"
},
"tableColumns": ["번호", "품목유형", "품목코드", "품목명", "규격", "단위", "매입단가", "가공비", "판매단가", "마진율", "적용일", "상태"],
"priceWorkflow": "미등록 → 초안 → 확정",
"prerequisites": "로그인된 사용자에게 단가 관리 권한 필요"
}
}