Files
sam-scenarios/settings-rank.json
kimbokon a8a8c15f99 fix: HR/설정 시나리오 셀렉터 수정 (8개 파일)
- settings-attendance: verify_elements→evaluate, :has-text→텍스트 target
- settings-vacation-policy: :nth-of-type/:has-text 제거, evaluate로 변경
- employee-register: menuNavigation 사원관리→직원관리, fill_form→evaluate
- department-add: verify_elements→evaluate, click_first_row 사용
- settings-rank: :has-text→텍스트 target, 직급명 입력 필드 확인 추가
- settings-position: verify_not_mockup→wait+evaluate, 직책명 입력 확인
- hr-vacation: 날짜 입력 evaluate 추가, :has-text→텍스트 target
- hr-salary: 날짜 필터 확인 스텝 추가, :has-text→텍스트 target

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 21:59:19 +09:00

118 lines
3.3 KiB
JSON

{
"id": "settings-rank",
"name": "직급관리 테스트",
"screenshotPolicy": {
"onErrorOnly": true,
"captureOn": [
"error",
"fail",
"timeout",
"404",
"500",
"blocked"
]
},
"description": "설정 > 직급관리 목록/검색/상세 기능 검증",
"baseUrl": "https://dev.codebridge-x.com",
"menuNavigation": {
"level1": "설정",
"level2": "직급관리",
"expectedUrl": "/settings/ranks",
"searchWithinParent": true,
"closeOtherMenus": true
},
"auth": {
"username": "TestUser5",
"password": "password123!"
},
"steps": [
{
"id": 1,
"name": "메뉴 진입: 설정 > 직급관리",
"action": "menu_navigate",
"level1": "설정",
"level2": "직급관리",
"expected": {
"url_contains": "/settings"
}
},
{
"id": 2,
"name": "URL 검증",
"action": "verify_url",
"expected": {
"url_contains": "/settings/ranks"
}
},
{
"id": 3,
"name": "목업 감지",
"action": "verify_not_mockup"
},
{
"id": 4,
"name": "테이블 구조 검증",
"action": "verify_table"
},
{
"id": 5,
"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": 6,
"name": "직급관리 페이지 확인",
"action": "verify_detail",
"checks": [
"visible_text:직급"
]
},
{
"id": 7,
"name": "설정 페이지 확인",
"action": "verify_detail",
"checks": [
"visible_text:설정"
]
},
{
"id": 8,
"name": "추가 버튼 클릭",
"action": "click_if_exists",
"target": "추가"
},
{
"id": 9,
"name": "모달/폼 대기",
"action": "wait",
"duration": 1000
},
{
"id": 10,
"name": "직급명 입력 필드 확인",
"action": "evaluate",
"script": "(() => { const modal = document.querySelector('[role=\"dialog\"], [aria-modal=\"true\"], [class*=\"modal\"]:not([class*=\"tooltip\"]), [class*=\"Modal\"], [class*=\"Sheet\"]'); const isVis = el => !!el && el.getBoundingClientRect().width > 0; const scope = isVis(modal) ? modal : document; const inputs = scope.querySelectorAll('input:not([type=\"hidden\"]), textarea'); const nameInput = Array.from(inputs).find(i => i.placeholder?.includes('직급') || i.name?.includes('rank') || i.name?.includes('name')); return 'Inputs: ' + inputs.length + ', Name input: ' + !!nameInput; })()"
},
{
"id": "10-1",
"name": "모달 닫기",
"action": "close_modal_if_open"
},
{
"id": 11,
"name": "콘솔 에러 확인",
"action": "verify_element",
"target": "body"
},
{
"id": 12,
"name": "직급관리 최종 확인",
"action": "verify_detail",
"checks": [
"visible_text:직급"
]
}
]
}